Add Android NDK complie supported.
Usage: ./ndk_make.sh [clean]
This commit is contained in:
parent
b650bc8287
commit
1ef4ac48a0
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,6 @@
|
|||||||
build/
|
build/
|
||||||
/tags
|
/tags
|
||||||
/bazel-*
|
/bazel-*
|
||||||
|
|
||||||
|
libs/
|
||||||
|
obj/
|
||||||
|
|||||||
14
Android.mk
Normal file
14
Android.mk
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
# --------------------------------------
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/src/*.cpp)
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES += src/
|
||||||
|
LOCAL_C_INCLUDES += include/
|
||||||
|
|
||||||
|
LOCAL_LDLIBS := -llog
|
||||||
|
|
||||||
|
LOCAL_MODULE := yamlcpp
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
||||||
6
Application.mk
Normal file
6
Application.mk
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
APP_ABI := arm64-v8a x86_64
|
||||||
|
APP_PLATFORM := android-26
|
||||||
|
APP_STL := c++_shared
|
||||||
|
APP_CPPFLAGS := -fexceptions
|
||||||
|
APP_CPPFLAGS += -frtti
|
||||||
|
#APP_ALLOW_MISSING_DEPS = true
|
||||||
15
ndk_make.sh
Executable file
15
ndk_make.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ $# -gt 1 ];then
|
||||||
|
echo "[Usage]: $0 or $0 clean."
|
||||||
|
exit
|
||||||
|
elif [ $# -eq 0 ];then
|
||||||
|
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk NDK_APPLICATION_MK=Application.mk
|
||||||
|
elif [ $# -eq 1 ];then
|
||||||
|
if [ "$1" = "clean" ];then
|
||||||
|
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk NDK_APPLICATION_MK=Application.mk clean
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo "[Usage]: $0 or $0 clean."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
Loading…
Reference in New Issue
Block a user