diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-01-03 22:20:40 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-01-03 22:20:40 +0000 |
commit | 76bab6bbd7fc1dd6a924a08a1bd62db08c8e7f0e (patch) | |
tree | 6088e38156f1f0cc7fee8c0e428e8710f62b702a | |
parent | 618c3eec93dc24e3b86b64bdfa99fa6a5e074c3a (diff) |
first stab at a working android build setup
svn path=/trunk/externals/template/; revision=14689
-rw-r--r-- | Makefile | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,4 +1,4 @@ -## Pd library template version 1.0.6 +## Pd library template version 1.0.7 # For instructions on how to use this template, see: # http://puredata.info/docs/developer/MakefileTemplate LIBRARY_NAME = template @@ -109,6 +109,25 @@ ifeq ($(UNAME),Darwin) pkglibdir=$(HOME)/Library/Pd endif endif +# Tho Android uses Linux, we use this fake uname to provide an easy way to +# setup all this things needed to cross-compile for Android using the NDK +ifeq ($(UNAME),ANDROID) + CPU := arm + SOURCES += $(SOURCES_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 + OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer + CFLAGS += -fPIC + LDFLAGS += -Wl,--export-dynamic -L$(NDK_SYSROOT)/usr/lib -shared -fPIC + LIBS += -lc + STRIP = strip --strip-unneeded -R .note -R .comment + DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) +endif ifeq ($(UNAME),Linux) CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) |