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
|
diff --git a/makefile b/makefile
index 2bf0be9..2c568f0 100644
--- a/makefile
+++ b/makefile
@@ -1,4 +1,4 @@
-.PHONY: all
++.PHONY: all
all: dmd
dmd: dmdserver dmdclient
@@ -32,8 +32,7 @@ clean:
CLIENT_SRC := \
$(shell find src/dcd/common -name "*.d")\
- $(shell find src/dcd/client -name "*.d")\
- $(shell find msgpack-d/src/ -name "*.d")
+ $(shell find src/dcd/client -name "*.d")
DMD_CLIENT_FLAGS := -Imsgpack-d/src\
-Imsgpack-d/src\
@@ -49,8 +48,8 @@ GDC_CLIENT_FLAGS := -Imsgpack-d/src\
-frelease\
-obin/dcd-client
-LDC_CLIENT_FLAGS := -Imsgpack-d/src\
- -Imsgpack-d/src\
+LDC_CLIENT_FLAGS := \
+ $(shell pkg-config --cflags msgpack-d) $(subst -l,-L=-l,$(shell pkg-config --libs msgpack-d))\
-J=bin\
-release\
-O5\
@@ -63,29 +62,7 @@ override GDC_CLIENT_FLAGS += $(DFLAGS)
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")
+ $(shell find src/dcd/server -name "*.d")
DMD_SERVER_FLAGS := -Icontainers/src\
-Imsgpack-d/src\
@@ -117,10 +94,10 @@ GDC_SERVER_FLAGS := -Icontainers/src\
-frelease\
-obin/dcd-server
-LDC_SERVER_FLAGS := -Icontainers/src\
- -Imsgpack-d/src\
- -I${DPARSE_DIR}/src\
- -I${DSYMBOL_DIR}/src\
+LDC_SERVER_FLAGS := $(shell pkg-config --cflags dcontainers) $(subst -l,-L=-l,$(shell pkg-config --libs dcontainers))\
+ $(shell pkg-config --cflags msgpack-d) $(subst -l,-L=-l,$(shell pkg-config --libs msgpack-d))\
+ $(shell pkg-config --cflags dparse) $(subst -l,-L=-l,$(shell pkg-config --libs dparse))\
+ $(shell pkg-config --cflags dsymbol) $(subst -l,-L=-l,$(shell pkg-config --libs dsymbol))\
-Isrc\
-J=bin\
-O5\
@@ -150,10 +127,10 @@ gdcserver: githash
mkdir -p bin
${GDC} ${SERVER_SRC} ${GDC_SERVER_FLAGS}
-ldcclient: githash
+ldcclient:
${LDC} ${CLIENT_SRC} ${LDC_CLIENT_FLAGS} -oq -of=bin/dcd-client
-ldcserver: githash
+ldcserver:
${LDC} $(LDC_SERVER_FLAGS) ${SERVER_SRC} -oq -of=bin/dcd-server
test: debugserver dmdclient
|