OsmAnd/Osmand-kernel/Makefile.vars
Alexey Pelykh a409860fa2 Cygwin JNI
2012-05-30 23:34:17 +03:00

67 lines
No EOL
1.7 KiB
Text

ifndef JAVA_HOME
$(error Set JAVA_HOME environment variable)
endif
arch := x86
ifeq ($(os),)
ifeq ($(shell uname),Darwin)
os := darwin
endif
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
os := cygwin
endif
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
os := win
endif
endif
ifeq ($(os),)
os := linux
endif
# Windows uses different path separators, because they hate me
ifeq ($(os),win)
sep := ;
else
sep := :
endif
# os=Default is meant to be generic unix/linux
linux_CXX := g++
linux_CC := gcc
linux_STRIP := strip
#Default_LINKFLAGS := -shared
#
Support10_4 := -isysroot /Developer/SDKs/MacOSX10.4u.sdk
darwin_CXX := gcc -arch $(arch) -mmacosx-version-min=10.4 $(Support10_4)
darwin_CC := gcc -arch $(arch) -mmacosx-version-min=10.4 $(Support10_4)
darwin_STRIP := strip -x
#darwin_CPP_FLAGS := strip -x
#darwin_LINKFLAGS := -dynamiclib $(Support10_4)
# mingw32 via Cygwin OBSOLETE : i686-pc-mingw32-
# mingw64 via Cygwin : i686-w64-mingw32-
# gcc via Cygwin : i686-pc-cygwin-
# x86_64-w64-mingw32
cygwin_CXX := i686-pc-cygwin-g++
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
win_STRIP := i586-mingw32msvc-strip
win_CPP_FLAGS := -D_Windows
#win_CFLAGS := -D_JNI_IMPLEMENTATION_ -Ilib/inc_win -I$(JAVA_HOME)/include -O
#win_LINKFLAGS := -Wl,--kill-at -shared
CXX := $($(os)_CXX)
CC := $($(os)_CC)
STRIP := $($(os)_STRIP)
CPP_OS_FLAGS := $($(os)_CPP_FLAGS)
LDFLAGS := $($(os)_LDFLAGS)