generated from milosz275/c-cpp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (31 loc) · 963 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
COMMON = common
SERVER = server
CLIENT = client
LIBNAME = libcommon.a
SERVER_BIN = $(SERVER)/build/bin/$(SERVER)
COMMON_LIB = $(COMMON)/build/lib/$(LIBNAME)
CLIENT_BIN = $(CLIENT)/build/bin/$(CLIENT)
.PHONY: all common server client
all: common server client
debug: common server-debug client-debug
common:
$(MAKE) -C $(COMMON) lib
server: common
$(MAKE) -C $(SERVER)
client: server
$(MAKE) -C $(CLIENT)
server-debug: common
$(MAKE) -C $(SERVER) debug
client-debug: server-debug
$(MAKE) -C $(CLIENT) debug
clean:
find $(SERVER)/build/src -name '*.o' -delete
find $(SERVER)/build/src -name '*~' -delete
$(RM) $(SERVER)/build/bin/$(SERVER)
find $(COMMON)/build/src -name '*.o' -delete
find $(COMMON)/build/src -name '*~' -delete
find $(COMMON)/build/bin -name '$(COMMON)' -delete
$(RM) $(COMMON)/build/lib/$(LIBNAME)
find $(CLIENT)/build/src -name '*.o' -delete
find $(CLIENT)/build/src -name '*~' -delete
$(RM) $(CLIENT)/build/bin/$(CLIENT)