Add entrypoint to build test

Just for convenience, nothing special here
This commit is contained in:
topjohnwu
2019-04-01 02:46:09 -04:00
parent 1b0c36dbd5
commit 08a70f033a
4 changed files with 21 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ android {
externalNativeBuild {
ndkBuild {
// Pass arguments to ndk-build.
arguments('B_MAGISK=1', 'B_INIT64=1', 'B_BOOT=1',
arguments('B_MAGISK=1', 'B_INIT64=1', 'B_BOOT=1', 'B_TEST=1',
'MAGISK_DEBUG=1', 'MAGISK_VERSION=debug', 'MAGISK_VER_CODE=INT_MAX')
}
}

1
native/jni/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
test.cpp

View File

@@ -121,6 +121,19 @@ include $(BUILD_EXECUTABLE)
endif
ifdef B_TEST
include $(CLEAR_VARS)
LOCAL_MODULE := test
LOCAL_STATIC_LIBRARIES := libutils
LOCAL_C_INCLUDES := \
jni/include \
$(LIBUTILS)
LOCAL_SRC_FILES := test.cpp
include $(BUILD_EXECUTABLE)
endif
ifdef B_BB
include jni/external/busybox/Android.mk