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 := win 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 := 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_STRIP := strip -x #darwin_CPP_FLAGS := strip -x #darwin_LINKFLAGS := -dynamiclib $(Support10_4) win_CXX := 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) STRIP := $($(os)_STRIP) CPP_OS_FLAGS = $($(os)_CPP_FLAGS) #LINKFLAGS := $($(os)_LINKFLAGS)