1
I have a simple project with native code and am using manual command to compile /workspace/android-ndk-r11c/ndk-build TARGET_PLATFORM=android-14 TARGET_ARCH_ABI=armeabi NDK_PROJECT_PATH=.
.
In my project I have Android.Mk
LOCAL_PATH := $(call my-dir)
subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
native_code \
))
ifeq($(TARGET_ARCH_ABI), armeabi-v7a)
MY_INCLUDE := ../build/module_armeabi-v7a
endif
ifeq($(TARGET_ARCH_ABI), armeabi)
MY_INCLUDE := ../build/module_armeabi
endif
ifndef MY_INCLUDE
$(error "You must define MY_INCLUDE before starting build_script.sh")
endif
include $(subdirs)
As you saw in the file Android.Mk above, I have the variable MY_INCLUDE
, through the ifeq($(TARGET_ARCH_ABI)
and according to the architecture passed in the TARGET_ARCH_ABI
, I can compile for different architectures.
So with the command ndk-build
I can compile perfectly, but I need it to Compile, not through command line with the ndk-build
, but rather through a build script which would also pass the variable MY_INCLUDE
for Android.Mk.
How could I compile by running the build_script.sh file?