From a409860fa24a2171a2dfced79e2185ab4ceb9fcb Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Wed, 30 May 2012 23:34:17 +0300 Subject: [PATCH] Cygwin JNI --- Osmand-kernel/Makefile.vars | 8 +++++--- Osmand-kernel/osmand/Makefile | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Osmand-kernel/Makefile.vars b/Osmand-kernel/Makefile.vars index 9a25ad1082..5786877ee9 100644 --- a/Osmand-kernel/Makefile.vars +++ b/Osmand-kernel/Makefile.vars @@ -48,8 +48,10 @@ darwin_STRIP := strip -x # gcc via Cygwin : i686-pc-cygwin- # x86_64-w64-mingw32 cygwin_CXX := i686-pc-cygwin-g++ -cygwin_CC := i686-pc-cygwin-gcc +cygwin_CC := i686-pc-cygwin-gcc cygwin_STRIP := i686-pc-cygwin-strip +cygwin_LDFLAGS := -Wl,--kill-at +cygwin_CPP_FLAGS := -D__int64="long long" -D_JNI_IMPLEMENTATION -D_REENTRANT -D_GNU_SOURCE win_CXX := i586-mingw32msvc-gcc win_CC := i586-mingw32msvc-gcc @@ -61,5 +63,5 @@ win_CPP_FLAGS := -D_Windows CXX := $($(os)_CXX) CC := $($(os)_CC) STRIP := $($(os)_STRIP) -CPP_OS_FLAGS = $($(os)_CPP_FLAGS) -#LINKFLAGS := $($(os)_LINKFLAGS) \ No newline at end of file +CPP_OS_FLAGS := $($(os)_CPP_FLAGS) +LDFLAGS := $($(os)_LDFLAGS) \ No newline at end of file diff --git a/Osmand-kernel/osmand/Makefile b/Osmand-kernel/osmand/Makefile index 75a34e7191..f83859c44b 100644 --- a/Osmand-kernel/osmand/Makefile +++ b/Osmand-kernel/osmand/Makefile @@ -10,7 +10,7 @@ RUNFILE := osmand_main LOCAL_SRC_FILES += src/osmand_main.cpp #LDFLAGS = -Wl,--hash-style=both -fPIC -LDFLAGS = -Wall -fPIC -Wl,-Bsymbolic +LDFLAGS := $(LDFLAGS) -Wall -fPIC -Wl,-Bsymbolic #LDRUNFLAGS = -Wl,--hash-style=both # --trace -Bsymbolic -Bsymbolic-functions @@ -28,7 +28,7 @@ endif ifeq ($(java_os),) ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) - java_os := linux + java_os := win32 endif ifeq ($(findstring MINGW,$(shell uname)),MINGW) java_os := win32 @@ -45,7 +45,8 @@ CPPFLAGS := \ -DGR_RELEASE=1 \ -c -fPIC -I"$(FIXED_JAVA_HOME)/include" -I"$(FIXED_JAVA_HOME)/include/$(java_os)" \ -DHASH_MAP_GNU \ - $(C_INCLUDES) + $(C_INCLUDES) \ + $(CPP_OS_FLAGS) #target : ../$(RUNFILE) #target : $(PREBUILT_DIR)/$(LIBNAME)