diff options
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 $@ $^ |