stk-code_catmod/android/Makefile

49 lines
1.5 KiB
Makefile
Raw Normal View History

2016-02-24 14:41:21 -05:00
NDK_PATH=android-ndk-r10e/
2016-02-25 13:30:00 -05:00
NDK_STANDALONE=`pwd`/${NDK_PATH}
export PATH :=$(shell pwd)/obj/bin:${PATH}
2016-02-24 14:41:21 -05:00
# target: all - Default target. Build and create the apk.
all: build apk
# target: build - Build the native code
2016-02-25 13:38:36 -05:00
build: obj/freetype.stamp jni/ifaddrs/ifaddrs.h jni/jpeglib/jpeglib.h
2016-02-24 14:41:21 -05:00
NDK_CCACHE=ccache ${NDK_PATH}/ndk-build -j3
# target: apk - Make a debug APK
apk:
ant debug
# target: install - Install the debug APK to the plugged device/emulator
install:
ant installd
# target: help - Display callable targets.
help:
egrep "^# target:" [Mm]akefile
run:
adb shell am start -n org.supertuxkart.stk/android.app.NativeActivity
2016-02-24 16:24:33 -05:00
stop:
adb shell am force-stop org.supertuxkart.stk
2016-02-24 16:24:33 -05:00
obj/freetype.stamp:
2016-02-25 13:30:00 -05:00
mkdir -p obj/deps && cd obj/deps && wget http://mirror6.layerjet.com/nongnu//freetype/freetype-2.6.tar.gz && tar -xzf freetype-2.6.tar.gz
2016-02-24 16:24:33 -05:00
mkdir -p obj/freetype
2016-02-25 13:30:00 -05:00
${NDK_PATH}/build/tools/make-standalone-toolchain.sh \
--platform=android-21 --install-dir=`pwd`/obj/ --arch=arm
cd obj/deps/freetype-2.6 && \
./configure --host=arm-linux-androideabi --prefix=/freetype --without-zlib --with-png=no --with-harfbuzz=no && \
2016-02-24 16:24:33 -05:00
make -j4 && \
2016-02-25 13:30:00 -05:00
make install DESTDIR=`pwd`/../../freetype && \
echo ${PATH}
2016-02-24 16:24:33 -05:00
touch obj/freetype.stamp
jni/ifaddrs/ifaddrs.h:
cd jni && git clone https://github.com/morristech/android-ifaddrs.git ifaddrs
2016-02-25 13:30:00 -05:00
2016-02-25 13:38:36 -05:00
jni/jpeglib/jpeglib.h:
git clone https://github.com/folecr/jpeg8d jni/jpeglib
2016-02-25 13:30:00 -05:00
#wget http://mirror6.layerjet.com/nongnu//freetype/freetype-2.6.tar.gz