-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
64 lines (51 loc) · 1.25 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
CLIENT = uchat
SERVER = uchat_server
UTILS = libutils
CJSON = libcjson
SQLITE = libsqlite3
CLIENTD = client
SERVERD = server
UTILSD = utils
CJSOND = libraries/libraries/cjson
SQLITED = libraries/libraries/sqlite3
LIB_DIR = libraries/include libraries/lib
CLIENTO = $(CLIENTD)/$(CLIENT)
SERVERO = $(SERVERD)/$(SERVER)
UTILSO = $(UTILSD)/$(UTILS).a
CJSONO = libraries/lib/$(CJSON).a
SQLITEO = libraries/lib/$(SQLITE).a
all: $(SQLITE) $(CJSON) $(UTILS) $(CLIENT) $(SERVER)
$(SQLITE): $(SQLITEO)
$(CJSON): $(CJSONO)
$(UTILS): $(UTILSO)
$(CLIENT): $(CLIENTO)
$(SERVER): $(SERVERO)
$(SQLITEO): $(SQLITED)
$(CJSONO): $(CJSOND)
$(UTILSO): $(UTILSD)
$(CLIENTO): $(CLIENTD)
$(SERVERO): $(SERVERD)
$(CLIENTO) $(SERVERO):
@make -sC $<
@cp $@ .
$(SQLITEO) $(CJSONO) $(UTILSO): | $(LIB_DIR)
@make -sC $<
$(LIB_DIR):
@mkdir -p $(LIB_DIR)
uninstall: clean
@make -sC $(SQLITED) $@
@make -sC $(CJSOND) $@
@make -sC $(UTILSD) $@
@make -sC $(CLIENTD) $@
@make -sC $(SERVERD) $@
@rm -rf $(LIB_DIR)
clean:
@rm -rf $(CLIENT)
@rm -rf $(SERVER)
@make -sC $(SQLITED) $@
@make -sC $(CJSOND) $@
@make -sC $(UTILSD) $@
@make -sC $(CLIENTD) $@
@make -sC $(SERVERD) $@
reinstall: uninstall all
.PHONY: + uninstall clean reinstall $(CLIENTO) $(SERVERO) $(SQLITEO) $(CJSONO) $(UTILSO)