aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/libjunbound/makefile.w64
diff options
context:
space:
mode:
Diffstat (limited to 'src/native/libjunbound/makefile.w64')
-rw-r--r--src/native/libjunbound/makefile.w6426
1 files changed, 26 insertions, 0 deletions
diff --git a/src/native/libjunbound/makefile.w64 b/src/native/libjunbound/makefile.w64
new file mode 100644
index 0000000..c3865f4
--- /dev/null
+++ b/src/native/libjunbound/makefile.w64
@@ -0,0 +1,26 @@
+CC = g++ -O2
+TARGET_BASENAME = junbound.dll
+TARGET_DIR ?= ../../../lib/native/windows-64
+JAVA_HOME = C:/Program Files/Java/jdk6
+
+ifeq ($(wildcard /bin/cygpath.*),/bin/cygpath.exe)
+ target.dir := $(shell cygpath --mixed "$(TARGET_DIR)")
+ cygwin.target.dir := $(shell cygpath --unix "$(TARGET_DIR)")
+else
+ target.dir := "$(TARGET_DIR)"
+ cygwin.target.dir := "$(TARGET_DIR)"
+endif
+
+CPPFLAGS = \
+ -Wall -Wreturn-type \
+ -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 \
+ -DJNI_IMPLEMENTATION \
+ -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" -Iwindows64
+
+LDFLAGS = -shared -static -Wl,--kill-at -Wl,--subsystem,windows
+LIBS = -Lwindows64 -lunbound -lldns -lcrypto -lws2_32 -lgdi32 -liphlpapi
+TARGET = $(TARGET_DIR)/$(TARGET_BASENAME)
+
+$(TARGET): src/*.cpp
+ $(CC) $(CPPFLAGS) $^ $(LDFLAGS) -o $@ $(LIBS)
+ -strip $(TARGET)