From: Alexis Laferrière Date: Sun, 2 Mar 2014 12:05:34 +0000 (-0500) Subject: nitg/android: add a deeper folder to generated project X-Git-Tag: v0.6.5~42^2~5 X-Git-Url: http://nitlanguage.org nitg/android: add a deeper folder to generated project Signed-off-by: Alexis Laferrière --- diff --git a/src/android_platform.nit b/src/android_platform.nit index 60d4ca0..c204651 100644 --- a/src/android_platform.nit +++ b/src/android_platform.nit @@ -67,7 +67,7 @@ class AndroidToolchain do var normal_compile_dir = super android_project_root = normal_compile_dir - return "{normal_compile_dir}/jni/" + return "{normal_compile_dir}/jni/nit_compile/" end redef fun write_files(compiler, compile_dir, cfiles) @@ -85,6 +85,9 @@ class AndroidToolchain var dir = "{android_project_root}/jni/" if not dir.file_exists then dir.mkdir + dir = compile_dir + if not dir.file_exists then dir.mkdir + # compile normal C files super(compiler, compile_dir, cfiles) @@ -93,10 +96,18 @@ class AndroidToolchain if f isa ExternCFile then cfiles.add(f.filename.basename("")) end - ### generate makefile into "{compile_dir}/Android.mk" - if not dir.file_exists then dir.mkdir + ## Generate delagating makefile + dir = "{android_project_root}/jni/" var file = new OFStream.open("{dir}/Android.mk") file.write """ +include $(call all-subdir-makefiles) +""" + file.close + + ### generate makefile into "{compile_dir}/Android.mk" + dir = compile_dir + file = new OFStream.open("{dir}/Android.mk") + file.write """ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS)