-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (49 loc) · 1.1 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
65
66
OBJDIR = obj
SRCDIR = src
SERVER_DIR = server
CLIENT_DIR = client
SERVER = uchat_server
CLIENT = uchat
LIBMX_DIR = libraries/libmx
LIBMX = $(LIBMX_DIR)/libmx.a
UTILSLIB_DIR = utils
UTILSLIB = $(UTILSLIB_DIR)/utilslib.a
CJSON_DIR = libraries/cjson
CJSON = $(CJSON_DIR)/libcjson.a
SQLITE_DIR = libraries/sqlite
SQLITE = $(SQLITE_DIR)/libsqlite3.a
SRC = $(SRCDIR)/*.c
OBJS = $(OBJDIR)/*.o
all: $(LIBMX) $(UTILSLIB) $(CJSON) $(SQLITE) $(SERVER) $(CLIENT)
install:
sudo apt update && sudo apt install libsqlite3-dev libssl-dev
$(LIBMX):
make -sC $(LIBMX_DIR)
$(UTILSLIB):
make -sC $(UTILSLIB_DIR)
$(CJSON):
make -sC $(CJSON_DIR)
$(SQLITE):
make -sC $(SQLITE_DIR)
$(SERVER):
make -sC $(SERVER_DIR)
$(CLIENT):
make -sC $(CLIENT_DIR)
font:
@mkdir -p ${HOME}/Library/Fonts
@cp client/data/fonts/Poppins/* ${HOME}/Library/Fonts/
clean:
rm -f $(OBJS)
rm -df $(OBJDIR)
uninstall:
make -sC $(SERVER_DIR) $@
make -sC $(CLIENT_DIR) $@
make -sC $(UTILSLIB_DIR) $@
make -sC $(LIBMX_DIR) $@
make -sC $(CJSON_DIR) $@
make -sC $(SQLITE_DIR) $@
make clean
rm -f $(UCHAT)
reinstall:
make uninstall
make all