diff options
Diffstat (limited to 'core/config.mk')
-rw-r--r-- | core/config.mk | 64 |
1 files changed, 61 insertions, 3 deletions
diff --git a/core/config.mk b/core/config.mk index 51810aa..4fd5bda 100644 --- a/core/config.mk +++ b/core/config.mk @@ -3,6 +3,24 @@ # current configuration and platform, which # are not specific to what is being built. +# These may be used to trace makefile issues without interfering with +# envsetup.sh. Usage: +# $(call ainfo,some info message) +# $(call aerror,some error message) +ifdef CALLED_FROM_SETUP +define ainfo +endef +define aerror +endef +else +define ainfo +$(info $(1)) +endef +define aerror +$(error $(1)) +endef +endif + # Only use ANDROID_BUILD_SHELL to wrap around bash. # DO NOT use other shells such as zsh. ifdef ANDROID_BUILD_SHELL @@ -41,7 +59,6 @@ SRC_HEADERS := \ $(TOPDIR)system/media/audio/include \ $(TOPDIR)hardware/libhardware/include \ $(TOPDIR)hardware/libhardware_legacy/include \ - $(TOPDIR)hardware/ril/include \ $(TOPDIR)libnativehelper/include \ $(TOPDIR)frameworks/native/include \ $(TOPDIR)frameworks/native/opengl/include \ @@ -118,6 +135,10 @@ COMMON_RELEASE_CFLAGS:= -DNDEBUG -UDEBUG COMMON_GLOBAL_CPPFLAGS:= $(COMMON_GLOBAL_CFLAGS) -Wsign-promo -std=gnu++11 COMMON_RELEASE_CPPFLAGS:= $(COMMON_RELEASE_CFLAGS) +# Force gcc to always output color diagnostics. Ninja will strip the ANSI +# color codes if it is not running in a terminal. +COMMON_GLOBAL_CFLAGS += -fdiagnostics-color + GLOBAL_CFLAGS_NO_OVERRIDE := \ -Werror=int-to-pointer-cast \ -Werror=pointer-to-int-cast \ @@ -161,6 +182,11 @@ include $(BUILD_SYSTEM)/envsetup.mk # See envsetup.mk for a description of SCAN_EXCLUDE_DIRS FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(OUT_DIR) $(SCAN_EXCLUDE_DIRS) .repo .git) +# General entries for project pathmap. Any entries listed here should +# be device and hardware independent. +$(call project-set-path-variant,recovery,RECOVERY_VARIANT,bootable/recovery) + +-include vendor/extra/BoardConfigExtra.mk # The build system exposes several variables for where to find the kernel # headers: # TARGET_DEVICE_KERNEL_HEADERS is automatically created for the current @@ -407,7 +433,9 @@ MKBOOTIMG := $(HOST_OUT_EXECUTABLES)/mkbootimg$(HOST_EXECUTABLE_SUFFIX) else MKBOOTIMG := $(BOARD_CUSTOM_MKBOOTIMG) endif +MKYAFFS2 := $(HOST_OUT_EXECUTABLES)/mkyaffs2image$(HOST_EXECUTABLE_SUFFIX) APICHECK := $(HOST_OUT_EXECUTABLES)/apicheck$(HOST_EXECUTABLE_SUFFIX) +MKIMAGE := $(HOST_OUT_EXECUTABLES)/mkimage$(HOST_EXECUTABLE_SUFFIX) FS_GET_STATS := $(HOST_OUT_EXECUTABLES)/fs_get_stats$(HOST_EXECUTABLE_SUFFIX) MAKE_EXT4FS := $(HOST_OUT_EXECUTABLES)/make_ext4fs$(HOST_EXECUTABLE_SUFFIX) MKEXTUSERIMG := $(HOST_OUT_EXECUTABLES)/mkuserimg.sh @@ -535,10 +563,15 @@ else DEFAULT_SYSTEM_DEV_CERTIFICATE := build/target/product/security/testkey endif +# Rules for QCOM targets +include $(BUILD_SYSTEM)/qcom_target.mk + +# Rules for MTK targets +include $(BUILD_SYSTEM)/mtk_target.mk + # ############################################################### # Set up final options. # ############################################################### - HOST_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS) HOST_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS) @@ -555,7 +588,8 @@ HOST_GLOBAL_LD_DIRS += -L$(HOST_OUT_INTERMEDIATE_LIBRARIES) TARGET_GLOBAL_LD_DIRS += -L$(TARGET_OUT_INTERMEDIATE_LIBRARIES) HOST_PROJECT_INCLUDES:= $(SRC_HEADERS) $(SRC_HOST_HEADERS) $(HOST_OUT_HEADERS) -TARGET_PROJECT_INCLUDES:= $(SRC_HEADERS) $(TARGET_OUT_HEADERS) \ +TARGET_PROJECT_INCLUDES:= $(SRC_HEADERS) $(TOPDIR)$(call project-path-for,ril)/include \ + $(TARGET_OUT_HEADERS) \ $(TARGET_DEVICE_KERNEL_HEADERS) $(TARGET_BOARD_KERNEL_HEADERS) \ $(TARGET_PRODUCT_KERNEL_HEADERS) @@ -686,4 +720,28 @@ endif RSCOMPAT_32BIT_ONLY_API_LEVELS := 8 9 10 11 12 13 14 15 16 17 18 19 20 RSCOMPAT_NO_USAGEIO_API_LEVELS := 8 9 10 11 12 13 +# We might want to skip items listed in PRODUCT_COPY_FILES based on +# various target flags. This is useful for replacing a binary module with one +# built from source. This should be a list of destination files under $OUT +# +TARGET_COPY_FILES_OVERRIDES := \ + $(addprefix %:, $(strip $(TARGET_COPY_FILES_OVERRIDES))) + +ifneq ($(TARGET_COPY_FILES_OVERRIDES),) + PRODUCT_COPY_FILES := $(filter-out $(TARGET_COPY_FILES_OVERRIDES), $(PRODUCT_COPY_FILES)) +endif + +ifneq ($(CM_BUILD),) +## We need to be sure the global selinux policies are included +## last, to avoid accidental resetting by device configs +$(eval include vendor/cm/sepolicy/sepolicy.mk) + +# Include any vendor specific config.mk file +-include $(TOPDIR)vendor/*/build/core/config.mk + +# Include any vendor specific apicheck.mk file +-include $(TOPDIR)vendor/*/build/core/apicheck.mk + +endif + include $(BUILD_SYSTEM)/dumpvar.mk |