diff options
author | Guangxiong Lin <[email protected]> | 2022-12-17 21:24:04 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-12-17 21:53:40 +0800 |
commit | e339f2d269fcaffed7beed67c3995fe3b67393eb (patch) | |
tree | f1a94f746808d2e90023b0d0cdbc8307b5648f88 /example/Makefile | |
parent | 7bb3515bc303a2a35fe859bcdba2795fbe06643d (diff) | |
download | tinyserver-master.tar.gz tinyserver-master.tar.bz2 tinyserver-master.zip |
Diffstat (limited to 'example/Makefile')
-rw-r--r-- | example/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/example/Makefile b/example/Makefile new file mode 100644 index 0000000..6f0fff8 --- /dev/null +++ b/example/Makefile @@ -0,0 +1,21 @@ +SERVER_NAME=server +SERVER_OBJ=server.o ../src/server.o ../src/tsocket.o ../src/util.o ../src/evloop.o ../src/tpool.o ../src/connection.o ../src/acceptor.o + +CLIENT_NAME=client +CLIENT_OBJ=client.o ../src/util.o + +.PHONY: all +all: $(SERVER_NAME) $(CLIENT_NAME) + +%.o: %.c + $(CC) -c $(CFLAGS) $< -o $@ + +$(SERVER_NAME): $(SERVER_OBJ) + $(CC) -o $@ $^ + +$(CLIENT_NAME): $(CLIENT_OBJ) + $(CC) -o $@ $^ + +.PHONY: clean +clean: + rm -rf $(CLIENT_NAME) $(SERVER_NAME) *.o |