aboutsummaryrefslogtreecommitdiff
path: root/unix
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-10-21 00:41:05 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-08-06 16:31:00 +0300
commit6b6834ea8fcaf22c2eb5ba17caa8fd0e5750be6a (patch)
tree265ad3a089a8bc48e5cf1e572347c56a666215b5 /unix
parentbf7e6d643cba316522ded19adebf6bd4a29273eb (diff)
build-android.sh: Android build script, using NDK standalone toolchain.cross
Diffstat (limited to 'unix')
-rwxr-xr-xunix/build-android.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/unix/build-android.sh b/unix/build-android.sh
new file mode 100755
index 000000000..3d11f18c2
--- /dev/null
+++ b/unix/build-android.sh
@@ -0,0 +1,16 @@
+# Requires standalone toolchain (as made by
+# make-standalone-toolchain.sh from NDK).
+# See docs/Programmers_Guide/html/md_3__key__topics__building__s_t_a_n_d_a_l_o_n_e-_t_o_o_l_c_h_a_i_n.html
+# under SDK dir ("Invoking the compiler (the easy way)" subsection).
+
+# Change for other architectures or toolchains
+export CROSS_COMPILE=arm-linux-androideabi-
+make deplibs
+
+# LDFLAGS_ARCH= suppresses map file generation, which
+# causes android-ndk-r10e gcc to fault
+make MICROPY_STANDALONE=1 MICROPY_PY_JNI=1 LDFLAGS_ARCH= V=1 -B
+make MICROPY_STANDALONE=1 MICROPY_PY_JNI=1 LDFLAGS_ARCH= V=1 lib
+
+# Automatically install on device/emulator for testing
+adb push micropython /data/local/tmp