-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
58 lines (42 loc) · 861 Bytes
/
makefile
File metadata and controls
58 lines (42 loc) · 861 Bytes
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
#Specials target
.PHONY:clean, $(SERVER_C), $(CLIENT_C)
.SUFFIXES:
#MACR DEFINITIONS
CC= gcc
LDFLAGS= `mysql_config --cflags --libs`
DEBUG=false
RM= rm -rf
CLIENT=CLIENT
SERVER=SERVER
CLIENT_C=CLIENT_c
SERVER_C=SERVER_C
OBJS_SERVER=Server/*.o
OBJS_CLIENT=
ifeq ($(DEBUG),true)
CFLAGS= -g -Wall -v
else
CFLAGS=
endif
all : $(SERVER)
$(SERVER): $(SERVER_C)
ifeq ($(DEBUG),true)
@echo "Génération Server en mode debug"
else
@echo "Génération Server en mode Release"
endif
$(CC) $(OBJS_SERVER) -o $@ $(LDFLAGS)
$(CLIENT): $(CLIENT_C)
ifeq ($(DEBUG),true)
@echo "Génération Client en mode debug"
else
@echo "Génération Client en mode Release"
endif
$(CC) $(OBJS_CLIENT) -o $@
$(SERVER_C):
make -C Server all
$(CLIENT_C):
make -C Client all
clean:
make -C Server clean
make -C Client clean
$(RM) -rf *.o $(SERVER) $(CLIENT)