parallelize LDC build
This commit is contained in:
parent
d7c889eaec
commit
4e8ac264ea
15
makefile
15
makefile
|
@ -10,6 +10,8 @@ DMD := dmd
|
||||||
GDC := gdc
|
GDC := gdc
|
||||||
LDC := ldc2
|
LDC := ldc2
|
||||||
|
|
||||||
|
OBJ_DIR := objs
|
||||||
|
|
||||||
githash:
|
githash:
|
||||||
git log -1 --format="%H" > githash.txt
|
git log -1 --format="%H" > githash.txt
|
||||||
|
|
||||||
|
@ -22,6 +24,7 @@ clean:
|
||||||
rm -f dscanner-report.json
|
rm -f dscanner-report.json
|
||||||
rm -f githash.txt
|
rm -f githash.txt
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
|
rm -rf $(OBJ_DIR)
|
||||||
|
|
||||||
CLIENT_SRC := src/client.d\
|
CLIENT_SRC := src/client.d\
|
||||||
src/messages.d\
|
src/messages.d\
|
||||||
|
@ -85,6 +88,8 @@ SERVER_SRC := src/actypes.d\
|
||||||
containers/src/containers/slist.d\
|
containers/src/containers/slist.d\
|
||||||
msgpack-d/src/msgpack.d
|
msgpack-d/src/msgpack.d
|
||||||
|
|
||||||
|
SERVER_OBJS = $(SERVER_SRC:%.d=$(OBJ_DIR)/%.o)
|
||||||
|
|
||||||
DMD_SERVER_FLAGS := -Icontainers/src\
|
DMD_SERVER_FLAGS := -Icontainers/src\
|
||||||
-Imsgpack-d/src\
|
-Imsgpack-d/src\
|
||||||
-Ilibdparse/src\
|
-Ilibdparse/src\
|
||||||
|
@ -114,11 +119,10 @@ GDC_SERVER_FLAGS := -Icontainers/src\
|
||||||
LDC_SERVER_FLAGS := -Icontainers/src\
|
LDC_SERVER_FLAGS := -Icontainers/src\
|
||||||
-Imsgpack-d/src\
|
-Imsgpack-d/src\
|
||||||
-Ilibdparse/src\
|
-Ilibdparse/src\
|
||||||
|
-Isrc\
|
||||||
-J=.\
|
-J=.\
|
||||||
-O5\
|
-O5\
|
||||||
-release\
|
-release\
|
||||||
-oq\
|
|
||||||
-of=bin/dcd-server
|
|
||||||
|
|
||||||
dmdclient: githash
|
dmdclient: githash
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
|
@ -148,5 +152,8 @@ gdcserver: githash
|
||||||
ldcclient: githash
|
ldcclient: githash
|
||||||
${LDC} ${CLIENT_SRC} ${LDC_CLIENT_FLAGS}
|
${LDC} ${CLIENT_SRC} ${LDC_CLIENT_FLAGS}
|
||||||
|
|
||||||
ldcserver: githash
|
$(OBJ_DIR)/%.o: $(SERVER_SRC)
|
||||||
${LDC} ${SERVER_SRC} ${LDC_SERVER_FLAGS}
|
$(LDC) $*.d $(LDC_SERVER_FLAGS) -od=$(OBJ_DIR) -op -c
|
||||||
|
|
||||||
|
ldcserver: githash $(SERVER_OBJS)
|
||||||
|
${LDC} ${SERVER_OBJS} ${LDC_SERVER_FLAGS} -of=bin/dcd-server
|
||||||
|
|
Loading…
Reference in New Issue