forked from dlang-community/DCD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
149 lines (126 loc) · 3.03 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
148
149
.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
STDXALLOC_DIR := stdx-allocator
githash:
git log -1 --format="%H" > 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 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\
-J.\
-inline\
-O\
-wi\
-ofbin/dcd-client
GDC_CLIENT_FLAGS := -Imsgpack-d/src\
-J.\
-O3\
-frelease\
-obin/dcd-client
LDC_CLIENT_FLAGS := -Imsgpack-d/src\
-Imsgpack-d/src\
-J=.\
-release\
-O5\
-oq\
-of=bin/dcd-client
SERVER_SRC := \
$(shell find src/dcd/common -name "*.d")\
$(shell find src/dcd/server -name "*.d")\
$(shell find ${DSYMBOL_DIR}/src -name "*.d")\
$(shell find ${STDXALLOC_DIR}/source -name "*.d")\
${DPARSE_DIR}/src/dparse/ast.d\
${DPARSE_DIR}/src/dparse/entities.d\
${DPARSE_DIR}/src/dparse/lexer.d\
${DPARSE_DIR}/src/dparse/parser.d\
${DPARSE_DIR}/src/dparse/formatter.d\
${DPARSE_DIR}/src/dparse/rollback_allocator.d\
${DPARSE_DIR}/src/dparse/stack_buffer.d\
${DPARSE_DIR}/src/std/experimental/lexer.d\
containers/src/containers/dynamicarray.d\
containers/src/containers/ttree.d\
containers/src/containers/unrolledlist.d\
containers/src/containers/openhashset.d\
containers/src/containers/hashset.d\
containers/src/containers/internal/hash.d\
containers/src/containers/internal/node.d\
containers/src/containers/internal/storage_type.d\
containers/src/containers/internal/element_type.d\
containers/src/containers/internal/backwards.d\
containers/src/containers/slist.d\
$(shell find msgpack-d/src/ -name "*.d")
DMD_SERVER_FLAGS := -Icontainers/src\
-Imsgpack-d/src\
-I${DPARSE_DIR}/src\
-I${DSYMBOL_DIR}/src\
-I${STDXALLOC_DIR}/source\
-J.\
-wi\
-O\
-release\
-inline\
-ofbin/dcd-server
DEBUG_SERVER_FLAGS := -Icontainers/src\
-Imsgpack-d/src\
-I${DPARSE_DIR}/src\
-I${DSYMBOL_DIR}/src\
-wi\
-g\
-ofbin/dcd-server\
-J.
GDC_SERVER_FLAGS := -Icontainers/src\
-Imsgpack-d/src\
-I${DPARSE_DIR}/src\
-I${DSYMBOL_DIR}/src\
-J.\
-O3\
-frelease\
-obin/dcd-server
LDC_SERVER_FLAGS := -Icontainers/src\
-Imsgpack-d/src\
-I${DPARSE_DIR}/src\
-I${DSYMBOL_DIR}/src\
-Isrc\
-J=.\
-O5\
-release
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}
ldcserver: githash
${LDC} $(LDC_SERVER_FLAGS) ${SERVER_SRC} -oq -of=bin/dcd-server
test: debugserver dmdclient
cd tests && ./run_tests.sh