Added win64 cross-compile target to makefile

Changed win32 and win64 tool variables to use CROSS_PREFIX,
since the prefix varies depending on the host system.
This commit is contained in:
Trevor Robinson 2012-09-06 19:15:12 -05:00
parent 6ee72edc39
commit 13cc8c3df2
2 changed files with 9 additions and 5 deletions

View File

@ -82,7 +82,11 @@ test: $(NATIVE_DLL)
$(MVN) test
win32:
$(MAKE) native CXX=mingw32-g++ OS_NAME=Windows OS_ARCH=x86
$(MAKE) native CROSS_PREFIX=i686-w64-mingw32- OS_NAME=Windows OS_ARCH=x86
# for cross-compilation on Ubuntu, install the g++-mingw-w64-x86-64 package
win64:
$(MAKE) native CROSS_PREFIX=x86_64-w64-mingw32- OS_NAME=Windows OS_ARCH=amd64
mac32:
$(MAKE) native OS_NAME=Mac OS_ARCH=i386

View File

@ -105,15 +105,15 @@ Mac-x86_64_LINKFLAGS := -dynamiclib -static-libgcc
Mac-x86_64_LIBNAME := libsnappyjava.jnilib
Mac-x86_64_SNAPPY_FLAGS :=
Windows-x86_CXX := mingw32-g++
Windows-x86_STRIP := strip
Windows-x86_CXX := $(CROSS_PREFIX)g++
Windows-x86_STRIP := $(CROSS_PREFIX)strip
Windows-x86_CXXFLAGS := -Ilib/inc_win -O2
Windows-x86_LINKFLAGS := -Wl,--kill-at -shared -static
Windows-x86_LIBNAME := snappyjava.dll
Windows-x86_SNAPPY_FLAGS :=
Windows-amd64_CXX := x86_64-w64-mingw32-g++
Windows-amd64_STRIP := x86_64-w64-mingw32-strip
Windows-amd64_CXX := $(CROSS_PREFIX)g++
Windows-amd64_STRIP := $(CROSS_PREFIX)strip
Windows-amd64_CXXFLAGS := -Ilib/inc_win -O2
Windows-amd64_LINKFLAGS := -Wl,--kill-at -shared -static
Windows-amd64_LIBNAME := snappyjava.dll