2012-05-15 20:48:06 +02:00
|
|
|
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)
|
2012-05-28 20:56:12 +02:00
|
|
|
os := cygwin
|
2012-05-15 20:48:06 +02:00
|
|
|
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
|
2012-05-27 21:10:44 +02:00
|
|
|
linux_CXX := g++
|
2012-05-28 20:56:12 +02:00
|
|
|
linux_CC := gcc
|
2012-05-15 20:48:06 +02:00
|
|
|
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)
|
2012-05-28 20:56:12 +02:00
|
|
|
darwin_CC := gcc -arch $(arch) -mmacosx-version-min=10.4 $(Support10_4)
|
2012-05-15 20:48:06 +02:00
|
|
|
darwin_STRIP := strip -x
|
2012-05-15 21:32:29 +02:00
|
|
|
#darwin_CPP_FLAGS := strip -x
|
|
|
|
#darwin_LINKFLAGS := -dynamiclib $(Support10_4)
|
2012-05-15 20:48:06 +02:00
|
|
|
|
2012-05-28 20:56:12 +02:00
|
|
|
# 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
|
2012-05-15 20:48:06 +02:00
|
|
|
|
|
|
|
win_CXX := i586-mingw32msvc-gcc
|
2012-05-28 20:56:12 +02:00
|
|
|
win_CC := i586-mingw32msvc-gcc
|
2012-05-15 20:48:06 +02:00
|
|
|
win_STRIP := i586-mingw32msvc-strip
|
2012-05-15 21:32:29 +02:00
|
|
|
win_CPP_FLAGS := -D_Windows
|
|
|
|
#win_CFLAGS := -D_JNI_IMPLEMENTATION_ -Ilib/inc_win -I$(JAVA_HOME)/include -O
|
|
|
|
#win_LINKFLAGS := -Wl,--kill-at -shared
|
2012-05-15 20:48:06 +02:00
|
|
|
|
|
|
|
CXX := $($(os)_CXX)
|
2012-05-28 20:56:12 +02:00
|
|
|
CC := $($(os)_CC)
|
2012-05-15 20:48:06 +02:00
|
|
|
STRIP := $($(os)_STRIP)
|
2012-05-15 21:32:29 +02:00
|
|
|
CPP_OS_FLAGS = $($(os)_CPP_FLAGS)
|
2012-05-15 20:48:06 +02:00
|
|
|
#LINKFLAGS := $($(os)_LINKFLAGS)
|