blob: e57c03038dc136be674a85d3ed0609b41a768d7c (
plain)
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
|
CC = g++ -O2
TARGET_BASENAME = junbound.dll
TARGET_DIR ?= ../../../lib/native/windows
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" -Iwindows32
LDFLAGS = -shared -static -Wl,--kill-at -Wl,--subsystem,windows
LIBS = -Lwindows32 -lunbound -lldns -lcrypto -lws2_32 -lgdi32 -liphlpapi
TARGET = $(TARGET_DIR)/$(TARGET_BASENAME)
$(TARGET): src/*.cpp
$(CC) $(CPPFLAGS) $^ $(LDFLAGS) -o $@ $(LIBS)
-strip $(TARGET)
|