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 /src/Makefile | |
parent | 7bb3515bc303a2a35fe859bcdba2795fbe06643d (diff) | |
download | tinyserver-e339f2d269fcaffed7beed67c3995fe3b67393eb.tar.gz tinyserver-e339f2d269fcaffed7beed67c3995fe3b67393eb.tar.bz2 tinyserver-e339f2d269fcaffed7beed67c3995fe3b67393eb.zip |
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/Makefile b/src/Makefile index bceb62e..a478ecf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,22 +1,17 @@ CC ?= gcc CFLAGS ?= -lpthread +SOURCES := $(wildcard *.c) +OBJECTS := $(patsubst %.c, %.o, $(SOURCES)) .PHONY: all -all: client server +all: $(OBJECTS) .PHONY: debug debug: CFLAGS += -g -DDEBUG=1 -debug: server client .PHONY: clean clean: - rm -rf client server *.o + rm -rf *.o %.o: %.c $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ - -client: client.o util.o - $(CC) -o $@ $^ - -server: server.o util.o evloop.o tsocket.o acceptor.o connection.o tpool.o - $(CC) -o $@ $^ |