diff options
Diffstat (limited to 'core/config.mk')
-rw-r--r-- | core/config.mk | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/core/config.mk b/core/config.mk index d486ed3..56ef97e 100644 --- a/core/config.mk +++ b/core/config.mk @@ -29,9 +29,11 @@ SRC_HEADERS := \ $(TOPDIR)hardware/libhardware_legacy/include \ $(TOPDIR)hardware/ril/include \ $(TOPDIR)dalvik/libnativehelper/include \ + $(TOPDIR)frameworks/native/include \ + $(TOPDIR)frameworks/native/opengl/include \ $(TOPDIR)frameworks/base/include \ $(TOPDIR)frameworks/base/opengl/include \ - $(TOPDIR)frameworks/base/native/include \ + $(TOPDIR)frameworks/base/native/include \ $(TOPDIR)external/skia/include SRC_HOST_HEADERS:=$(TOPDIR)tools/include SRC_LIBRARIES:= $(TOPDIR)libs @@ -73,6 +75,8 @@ BUILD_COPY_HEADERS := $(BUILD_SYSTEM)/copy_headers.mk BUILD_NATIVE_TEST := $(BUILD_SYSTEM)/native_test.mk BUILD_HOST_NATIVE_TEST := $(BUILD_SYSTEM)/host_native_test.mk +-include cts/build/config.mk + # ############################################################### # Parse out any modifier targets. # ############################################################### @@ -147,6 +151,33 @@ include $(board_config_mk) TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk))) board_config_mk := +# pull in device specific kernel headers. Files should be in +# $(TARGET_DEVICE_DIR)/kernel-headers, e.g. +# $(TARGET_DEVICE_DIR)/kernel-headers/linux/ +# $(TARGET_DEVICE_DIR)/kernel-headers/media/ +# $(TARGET_DEVICE_DIR)/kernel-headers/video/ +# etc. +TARGET_DEVICE_KERNEL_HEADERS := $(strip $(wildcard $(TARGET_DEVICE_DIR)/kernel-headers)) + +define validate-kernel-headers +$(if $(firstword $(foreach hdr_dir,$(1),\ + $(filter-out kernel-headers,$(notdir $(hdr_dir))))),\ + $(error Kernel header dirs must be end in kernel-headers: $(1))) +endef +# also allow the board config to provide additional directories since +# there could be device/oem/base_hw and device/oem/derived_hw +# that both are valid devices but derived_hw needs to use kernel headers +# from base_hw. +TARGET_BOARD_KERNEL_HEADERS := $(strip $(wildcard $(TARGET_BOARD_KERNEL_HEADERS))) +TARGET_BOARD_KERNEL_HEADERS := $(patsubst %/,%,$(TARGET_BOARD_KERNEL_HEADERS)) +$(call validate-kernel-headers,$(TARGET_BOARD_KERNEL_HEADERS)) + +# then add product-inherited includes, to allow for +# hardware/sivendor/chip/chip.mk to include their own headers +TARGET_PRODUCT_KERNEL_HEADERS := $(strip $(wildcard $(PRODUCT_VENDOR_KERNEL_HEADERS))) +TARGET_PRODUCT_KERNEL_HEADERS := $(patsubst %/,%,$(TARGET_PRODUCT_KERNEL_HEADERS)) +$(call validate-kernel-headers,$(TARGET_PRODUCT_KERNEL_HEADERS)) + # Clean up/verify variables defined by the board config file. TARGET_BOOTLOADER_BOARD_NAME := $(strip $(TARGET_BOOTLOADER_BOARD_NAME)) TARGET_CPU_ABI := $(strip $(TARGET_CPU_ABI)) @@ -169,6 +200,14 @@ include $(BUILD_SYSTEM)/combo/select.mk combo_target := TARGET_ include $(BUILD_SYSTEM)/combo/select.mk +# Compute TARGET_TOOLCHAIN_ROOT from TARGET_TOOLS_PREFIX +# if only TARGET_TOOLS_PREFIX is passed to the make command. +ifndef TARGET_TOOLCHAIN_ROOT +TARGET_TOOLCHAIN_ROOT := $(patsubst %/, %, $(dir $(TARGET_TOOLS_PREFIX))) +TARGET_TOOLCHAIN_ROOT := $(patsubst %/, %, $(dir $(TARGET_TOOLCHAIN_ROOT))) +TARGET_TOOLCHAIN_ROOT := $(wildcard $(TARGET_TOOLCHAIN_ROOT)) +endif + # Pick a Java compiler. include $(BUILD_SYSTEM)/combo/javac.mk @@ -318,7 +357,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) $(TARGET_OUT_HEADERS) \ + $(TARGET_OUT_KERNEL_HEADERS) # Many host compilers don't support these flags, so we have to make # sure to only specify them for the target compilers checked in to @@ -339,8 +379,8 @@ PREBUILT_IS_PRESENT := $(if $(wildcard prebuilt/Android.mk),true) # For use with the LOCAL_SDK_VERSION variable for include $(BUILD_PACKAGE) # ############################################################### -HISTORICAL_SDK_VERSIONS_ROOT := $(TOPDIR)prebuilt/sdk -HISTORICAL_NDK_VERSIONS_ROOT := $(TOPDIR)prebuilt/ndk +HISTORICAL_SDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/sdk +HISTORICAL_NDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/ndk # Historical SDK version N is stored in $(HISTORICAL_SDK_VERSIONS_ROOT)/N. # The 'current' version is whatever this source tree is. |