-
Notifications
You must be signed in to change notification settings - Fork 71
/
makefile
147 lines (119 loc) · 2.68 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
.PHONY: all
all: dmd
dmd: dmdserver dmdclient
debug: dmdclient debugserver
gdc: gdcserver gdcclient
ldc: ldcserver ldcclient
DMD := dmd
GDC := gdc
LDC := ldc2
DPARSE_DIR := libdparse
DSYMBOL_DIR := dsymbol
githash:
@mkdir -p bin
git describe --tags > bin/githash.txt
report:
dscanner --report src > dscanner-report.json
sonar-runner
clean:
rm -rf bin
rm -f dscanner-report.json
rm -f githash.txt
rm -f *.o
CLIENT_SRC := \
$(shell find common/src/dcd/common -name "*.d")\
$(shell find src/dcd/client -name "*.d")\
$(shell find msgpack-d/src/ -name "*.d")
DMD_CLIENT_FLAGS := -Imsgpack-d/src\
-Imsgpack-d/src\
-Jbin\
-O\
-wi\
-ofbin/dcd-client
GDC_CLIENT_FLAGS := -Imsgpack-d/src\
-Jbin\
-O3\
-frelease\
-obin/dcd-client
LDC_CLIENT_FLAGS := -Imsgpack-d/src\
-Imsgpack-d/src\
-J=bin\
-release\
-O5\
-oq\
-of=bin/dcd-client
ifneq ($(shell uname), OpenBSD)
override DMD_CLIENT_FLAGS += -inline
endif
override DMD_CLIENT_FLAGS += $(DFLAGS)
override LDC_CLIENT_FLAGS += $(DFLAGS)
override GDC_CLIENT_FLAGS += $(DFLAGS)
SERVER_SRC := \
$(shell find common/src/dcd/common -name "*.d")\
$(shell find src/dcd/server -name "*.d")\
$(shell find ${DSYMBOL_DIR}/src -name "*.d")\
$(shell find ${DPARSE_DIR}/src -name "*.d")\
$(shell find containers/src -name "*.d")\
$(shell find msgpack-d/src/ -name "*.d")
DMD_SERVER_FLAGS := -Icontainers/src\
-Imsgpack-d/src\
-I${DPARSE_DIR}/src\
-I${DSYMBOL_DIR}/src\
-Jbin\
-wi\
-O\
-release\
-ofbin/dcd-server
DEBUG_SERVER_FLAGS := -Icontainers/src\
-Imsgpack-d/src\
-I${DPARSE_DIR}/src\
-I${DSYMBOL_DIR}/src\
-wi\
-g\
-ofbin/dcd-server\
-Jbin
GDC_SERVER_FLAGS := -Icontainers/src\
-Imsgpack-d/src\
-I${DPARSE_DIR}/src\
-I${DSYMBOL_DIR}/src\
-Jbin\
-O3\
-frelease\
-obin/dcd-server
LDC_SERVER_FLAGS := -Icontainers/src\
-Imsgpack-d/src\
-I${DPARSE_DIR}/src\
-I${DSYMBOL_DIR}/src\
-Isrc\
-J=bin\
-O5\
-release
ifneq ($(shell uname), OpenBSD)
DMD_SERVER_FLAGS += -inline
endif
override DMD_SERVER_FLAGS += $(DFLAGS)
override LDC_SERVER_FLAGS += $(DFLAGS)
override GDC_SERVER_FLAGS += $(DFLAGS)
dmdclient: githash
mkdir -p bin
${DMD} ${CLIENT_SRC} ${DMD_CLIENT_FLAGS}
dmdserver: githash
mkdir -p bin
${DMD} ${SERVER_SRC} ${DMD_SERVER_FLAGS}
debugserver: githash
mkdir -p bin
${DMD} ${SERVER_SRC} ${DEBUG_SERVER_FLAGS}
gdcclient: githash
mkdir -p bin
${GDC} ${CLIENT_SRC} ${GDC_CLIENT_FLAGS}
gdcserver: githash
mkdir -p bin
${GDC} ${SERVER_SRC} ${GDC_SERVER_FLAGS}
ldcclient: githash
${LDC} ${CLIENT_SRC} ${LDC_CLIENT_FLAGS} -oq -of=bin/dcd-client
ldcserver: githash
${LDC} $(LDC_SERVER_FLAGS) ${SERVER_SRC} -oq -of=bin/dcd-server
test: debugserver dmdclient
cd tests && ./run_tests.sh --extra
release:
./release.sh