aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-12-16 13:53:35 +0800
committerGuangxiong Lin <[email protected]>2022-12-16 13:53:35 +0800
commit7369505397cdfddf0883e2c24e1652df8bd488fe (patch)
treee961bd1bba0276e2c5f523bf12663b34983c9e51 /Makefile
parent49839c88a98d3798f7b18c58f54f26f36cacff38 (diff)
downloadtinyserver-7369505397cdfddf0883e2c24e1652df8bd488fe.tar.gz
tinyserver-7369505397cdfddf0883e2c24e1652df8bd488fe.tar.bz2
tinyserver-7369505397cdfddf0883e2c24e1652df8bd488fe.zip
Refactor file structure
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 3 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index bceb62e..1c79ae9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,4 @@
-CC ?= gcc
-CFLAGS ?= -lpthread
+default: all
-.PHONY: all
-all: client server
-
-.PHONY: debug
-debug: CFLAGS += -g -DDEBUG=1
-debug: server client
-
-.PHONY: clean
-clean:
- rm -rf client server *.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 $@ $^
+.DEFAULT:
+ cd src && $(MAKE) $@