Simplify debug flag propagation

This commit is contained in:
topjohnwu
2018-09-28 02:05:55 -04:00
parent 2118beeb23
commit b127e01845
3 changed files with 9 additions and 6 deletions

View File

@@ -14,8 +14,7 @@ android {
externalNativeBuild {
ndkBuild {
// Pass arguments to ndk-build.
arguments('B_MAGISK=1', 'B_INIT=1', 'B_BOOT=1', 'B_BXZ=1',
'MAGISK_DEBUG=-DMAGISK_DEBUG')
arguments('B_MAGISK=1', 'B_INIT=1', 'B_BOOT=1', 'B_BXZ=1', 'MAGISK_DEBUG=1')
}
}
}

View File

@@ -1,10 +1,13 @@
APP_ABI := armeabi-v7a x86
APP_CFLAGS := -std=gnu11 ${MAGISK_DEBUG} \
-DMAGISK_VERSION="${MAGISK_VERSION}" -DMAGISK_VER_CODE=${MAGISK_VER_CODE}
APP_CFLAGS := -std=gnu11 -DMAGISK_VERSION="${MAGISK_VERSION}" -DMAGISK_VER_CODE=${MAGISK_VER_CODE}
APP_CPPFLAGS := -std=c++14
APP_STL := system
APP_PLATFORM := android-16
ifdef MAGISK_DEBUG
APP_CFLAGS += -DMAGISK_DEBUG
endif
# Busybox require some additional settings
ifdef B_BB
APP_SHORT_COMMANDS := true