aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-12-17 21:24:04 +0800
committerGuangxiong Lin <[email protected]>2022-12-17 21:53:40 +0800
commite339f2d269fcaffed7beed67c3995fe3b67393eb (patch)
treef1a94f746808d2e90023b0d0cdbc8307b5648f88 /src/Makefile
parent7bb3515bc303a2a35fe859bcdba2795fbe06643d (diff)
downloadtinyserver-e339f2d269fcaffed7beed67c3995fe3b67393eb.tar.gz
tinyserver-e339f2d269fcaffed7beed67c3995fe3b67393eb.tar.bz2
tinyserver-e339f2d269fcaffed7beed67c3995fe3b67393eb.zip
Support on_connect function in server libHEADmaster
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile13
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 $@ $^