Fix googletest android build
[fltk_mvc_template.git] / _template / packages / googletest1.8.1 / Makefile
index 506115d..8c37512 100644 (file)
@@ -10,7 +10,7 @@ WORKDIR = $(shell pwd)
 ANDROID_NDK_HOME=/usr/lib/android-ndk
 export PATH := $(ANDROID_NDK_HOME)/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/:$(PATH)
 
-all: unpack windows linux32 linux_arm
+all: unpack windows linux32 linux_arm android_arm
 
 .PHONY: unpack
 unpack:
@@ -58,13 +58,12 @@ linux_arm:
        cp $(WORKDIR)/googletest-release-1.8.1/googletest/lib/.libs/libgtest.a $(WORKDIR)/../../lib/linux_arm
        cp $(WORKDIR)/googletest-release-1.8.1/googlemock/lib/.libs/libgmock.a $(WORKDIR)/../../lib/linux_arm
 
-## not working...
 .PHONY: android_arm
 android_arm:
        cd $(WORKDIR)/googletest-release-1.8.1; \
        make clean; \
        autoreconf -vfi; \
-       ./configure --host=arm-linux-androideabi CFLAGS="--sysroot=$(ANDROID_NDK_HOME)/platforms/android-23/arch-arm -I$(ANDROID_NDK_HOME)/sources/cxx-stl/llvm-libc++/libcxx/include -I$(ANDROID_NDK_HOME)/sources/android/support/include -I$(ANDROID_NDK_HOME)/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" LDFLAGS="--sysroot=$(ANDROID_NDK_HOME)/platforms/android-23/arch-arm -static-libgcc -static-libstdc++"; \
+       ./configure --host=arm-linux-androideabi CXXFLAGS="--sysroot=$(ANDROID_NDK_HOME)/platforms/android-23/arch-arm -I$(ANDROID_NDK_HOME)/sources/cxx-stl/llvm-libc++/libcxx/include -I$(ANDROID_NDK_HOME)/sources/android/support/include -I$(ANDROID_NDK_HOME)/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" LDFLAGS="--sysroot=$(ANDROID_NDK_HOME)/platforms/android-23/arch-arm -static-libgcc -static-libstdc++"; \
        make -j4
        mkdir -p $(WORKDIR)/../../include
        mkdir -p $(WORKDIR)/../../lib/android_arm