Proper incremental builds

Auto generate flag.h for precise rebuilding
This commit is contained in:
topjohnwu
2021-09-07 19:35:28 -07:00
parent 714feeb9a7
commit de2306bd12
11 changed files with 56 additions and 74 deletions

View File

@@ -1,9 +1,11 @@
LOCAL_PATH := $(call my-dir)
# All Magisk common code lives here
include $(CLEAR_VARS)
LOCAL_MODULE:= libutils
LOCAL_C_INCLUDES := jni/include $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_C_INCLUDES := jni/include $(LOCAL_PATH)/include out/generated
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_EXPORT_STATIC_LIBRARIES := libcxx
LOCAL_STATIC_LIBRARIES := libcxx
LOCAL_SRC_FILES := \

View File

@@ -1,7 +1,7 @@
#include <cstdio>
#include <cstdlib>
#include <flags.hpp>
#include <flags.h>
#include "logging.hpp"
@@ -47,7 +47,7 @@ void cmdline_logging() {
}
// LTO will optimize out the NOP function
#ifdef MAGISK_DEBUG
#if MAGISK_DEBUG
void LOGD(const char *fmt, ...) { LOG_BODY(d) }
#else
void LOGD(const char *fmt, ...) {}