1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 11:15:13 +03:00
aports/testing/dcd/do-shared-linking.patch
Rasmus Thomsen c3613e450b testing/dcd: new aport
https://github.com/dlang-community/DCD
The D Completion Daemon is an auto-complete program for the D programming language
2020-03-01 11:24:34 +01:00

90 lines
2.9 KiB
Diff

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