forked from openkylin/platform_build
Define __BRILLO__ only for target modules
__ANDROID__ is only defined for target modules, do the same for __BRILLO__. Change-Id: Ie1417e1a5b21c051acf05b2bd3bdb3ddd31be878
This commit is contained in:
parent
16e7e0f556
commit
de6494b9ae
|
@ -186,15 +186,6 @@ include $(BUILD_SYSTEM)/envsetup.mk
|
||||||
# See envsetup.mk for a description of SCAN_EXCLUDE_DIRS
|
# See envsetup.mk for a description of SCAN_EXCLUDE_DIRS
|
||||||
FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(OUT_DIR) $(SCAN_EXCLUDE_DIRS) .repo .git)
|
FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(OUT_DIR) $(SCAN_EXCLUDE_DIRS) .repo .git)
|
||||||
|
|
||||||
ifdef BRILLO
|
|
||||||
# Add a C define that identifies Brillo targets. __BRILLO__ should only be used
|
|
||||||
# to differentiate between Brillo and non-Brillo-but-Android environments. Use
|
|
||||||
# __ANDROID__ instead to test if something is being built in an Android-derived
|
|
||||||
# environment (including Brillo) as opposed to an entirely different
|
|
||||||
# environment (e.g. Chrome OS).
|
|
||||||
COMMON_GLOBAL_CFLAGS += -D__BRILLO__
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# We run gcc/clang with PWD=/proc/self/cwd to remove the $TOP
|
# We run gcc/clang with PWD=/proc/self/cwd to remove the $TOP
|
||||||
# from the debug output. That way two builds in two different
|
# from the debug output. That way two builds in two different
|
||||||
|
@ -701,6 +692,18 @@ HOST_CROSS_GLOBAL_CFLAGS += $(HOST_CROSS_RELEASE_CFLAGS)
|
||||||
HOST_CROSS_GLOBAL_CPPFLAGS += $(HOST_CROSS_RELEASE_CPPFLAGS)
|
HOST_CROSS_GLOBAL_CPPFLAGS += $(HOST_CROSS_RELEASE_CPPFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef BRILLO
|
||||||
|
# Add a C define that identifies Brillo targets. __BRILLO__ should only be used
|
||||||
|
# to differentiate between Brillo and non-Brillo-but-Android environments. Use
|
||||||
|
# __ANDROID__ instead to test if something is being built in an Android-derived
|
||||||
|
# environment (including Brillo) as opposed to an entirely different
|
||||||
|
# environment (e.g. Chrome OS).
|
||||||
|
TARGET_GLOBAL_CFLAGS += -D__BRILLO__
|
||||||
|
ifdef TARGET_2ND_ARCH
|
||||||
|
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CFLAGS += -D__BRILLO__
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# allow overriding default Java libraries on a per-target basis
|
# allow overriding default Java libraries on a per-target basis
|
||||||
ifeq ($(TARGET_DEFAULT_JAVA_LIBRARIES),)
|
ifeq ($(TARGET_DEFAULT_JAVA_LIBRARIES),)
|
||||||
TARGET_DEFAULT_JAVA_LIBRARIES := core-libart core-junit ext framework okhttp
|
TARGET_DEFAULT_JAVA_LIBRARIES := core-libart core-junit ext framework okhttp
|
||||||
|
|
Loading…
Reference in New Issue