-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (30 loc) · 839 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
40
NAME = uchat
SERVER_NAME = uchat_server
SERVER_DIR = server
CLIENT_DIR = client
LIBMX_DIR = libmx
JSON_DIR = libjson
SERVER_DB = uchat.db
MAKE_M = make -sf Makefile -C
RM = /bin/rm -rf
all:
@$(MAKE_M) $(SERVER_DIR) $@
@$(MAKE_M) $(CLIENT_DIR) $@
@cp $(addprefix $(CLIENT_DIR)/, $(NAME)) $(addprefix $(SERVER_DIR)/, $(SERVER_NAME)) .
$(NAME):
@$(MAKE_M) $(CLIENT_DIR)
$(SERVER_NAME):
@$(MAKE_M) $(SERVER_DIR)
clean:
@$(MAKE_M) $(SERVER_DIR) $@
@$(MAKE_M) $(CLIENT_DIR) $@
@$(MAKE_M) $(LIBMX_DIR) $@
@$(MAKE_M) $(JSON_DIR) $@
uninstall:
@$(MAKE_M) $(SERVER_DIR) $@
@$(MAKE_M) $(CLIENT_DIR) $@
@$(MAKE_M) $(LIBMX_DIR) $@
@$(MAKE_M) $(JSON_DIR) $@
@rm -rf $(NAME) $(SERVER_NAME) $(SERVER_DB) $(addprefix $(SERVER_DIR)/, $(SERVER_DB))
reinstall: uninstall all
.PHONY: all clean uninstall reinstall $(NAME) $(SERVER_NAME)