diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-02-08 17:42:36 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-02-08 17:42:36 +0000 |
commit | 8c32fb86ad7f40f9cfc77a81458f4d5357876335 (patch) | |
tree | fdcdb326f9569b34c2d318c7a88a50aca0d1bf37 | |
parent | 250fb97d4df635c03ef885abed62a585b2cf4909 (diff) |
fixed Android support to work seamlessly with NDKr5 on GNU/Linux and Mac OS X
svn path=/trunk/externals/template/; revision=14873
-rw-r--r-- | Makefile | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -1,4 +1,4 @@ -## Pd library template version 1.0.7 +## Pd library template version 1.0.8 # For instructions on how to use this template, see: # http://puredata.info/docs/developer/MakefileTemplate LIBRARY_NAME = template @@ -117,15 +117,18 @@ ifeq ($(UNAME),ANDROID) EXTENSION = pd_linux OS = android PD_PATH = /usr - NDK_BASE=/usr/local/android-ndk - NDK_SYSROOT=$(NDK_BASE)/platforms/android-5/arch-arm - NDK_TOOLCHAIN=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86 - CC=$(NDK_TOOLCHAIN)/bin/arm-linux-androideabi-gcc + NDK_BASE := /usr/local/android-ndk + NDK_PLATFORM_VERSION := 5 + NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_VERSION)/arch-arm + NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]') + NDK_TOOLCHAIN=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/$(NDK_UNAME)-x86 + CC := $(NDK_TOOLCHAIN)/bin/arm-linux-androideabi-gcc --sysroot=$(NDK_SYSROOT) OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer - CFLAGS += -fPIC -I$(NDK_SYSROOT)/usr/include - LDFLAGS += -Wl,--export-dynamic -L$(NDK_SYSROOT)/usr/lib -shared -fPIC + CFLAGS += + LDFLAGS += -Wl,--export-dynamic -shared LIBS += -lc - STRIP = strip --strip-unneeded -R .note -R .comment + STRIP := $(NDK_TOOLCHAIN)/bin/arm-linux-androideabi-strip \ + --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),Linux) |