11# # Initialize build defaults
22include build/init.mk
33
4- cc := $(shell which x86_64-w64-mingw32-gcc)
4+ COMPILER := $(shell which x86_64-w64-mingw32-gcc)
5+ COMPILER_CXX := $(shell which x86_64-w64-mingw32-g++)
6+
57ar := $(shell which x86_64-w64-mingw32-ar)
68ranlib := $(shell which x86_64-w64-mingw32-ranlib)
7- ld := $(shell which x86_64-w64-mingw32-ld )
9+ ld := $(shell which x86_64-w64-mingw32-g++ )
810system := Windows
9- cflags += -mthreads ${defines} -D'ARCH="WIN"' -DARCH_WIN -DLUA_USE_WINDOWS -DLIBRARY
11+ cflags += -fPIC -DLIBRARY -mthreads ${defines}
12+ cflags += -D'ARCH="WIN"' -DARCH_WIN -DLUA_USE_WINDOWS
1013ldflags += -L/usr/x86_64-w64-mingw32/lib -shared
1114ldadd += -l:libm.a -l:libpthread.a -lssp -Wl,--out-implib,libzenroom_dll.lib
1215
13- # # Specific compiler settings for all built dependencies
14- ifdef RELEASE
15- cflags += -O3 ${cflags_protection} -fPIC
16- else
17- cflags += ${cflags_debug} -fPIC
18- endif
19- ifdef CCACHE
20- milagro_cmake_flags += -DCMAKE_C_COMPILER_LAUNCHER=ccache
21- zenroom_cc := ccache ${cc}
22- quantum_proof_cc := ccache ${cc}
23- ed25519_cc := ccache ${cc}
24- libcc_cc := ccache ${cc}
25- lua_cc := ccache ${cc}
26- endif
27-
16+ # activate CCACHE etc.
17+ include build/plugins.mk
2818
2919all : ${BUILD_DEPS} stamp-exe-windres zenroom.dll
3020
@@ -33,12 +23,7 @@ stamp-exe-windres:
3323
3424zenroom.dll : ${ZEN_SOURCES}
3525 $(info === Linking Windows zenroom.dll)
36- ${cc } ${cflags} ${ZEN_SOURCES} \
26+ ${ld } ${cflags} ${ZEN_SOURCES} \
3727 -o $@ zenroom.res ${ldflags} ${ldadd}
3828
3929include build/deps.mk
40-
41-
42- # win-dll: ${BUILDS}
43- # CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
44- # make -C src win-dll
0 commit comments