diff --git a/.gitignore b/.gitignore index 2f9d10f..25c762d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ build/ /tags /bazel-* + +libs/ +obj/ diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..0ff49a6 --- /dev/null +++ b/Android.mk @@ -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) + diff --git a/Application.mk b/Application.mk new file mode 100644 index 0000000..12f0228 --- /dev/null +++ b/Application.mk @@ -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 diff --git a/ndk_make.sh b/ndk_make.sh new file mode 100755 index 0000000..d5cbe3f --- /dev/null +++ b/ndk_make.sh @@ -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