-
Notifications
You must be signed in to change notification settings - Fork 1
/
defconfig.mk
34 lines (28 loc) · 1.18 KB
/
defconfig.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
DEFCONFIGSRC := kernel/arch/arm/configs
LJAPDEFCONFIGSRC := ${DEFCONFIGSRC}/ext_config
PRODUCT_SPECIFIC_DEFCONFIGS := $(DEFCONFIGSRC)/$(KERNEL_DEFCONFIG)
TARGET_DEFCONFIG := $(KERNEL_OUT)/mapphone_defconfig
KERNEL_DEBUG_DEFCONFIG := $(LJAPDEFCONFIGSRC)/debug-$(subst _defconfig,,$(KERNEL_DEFCONFIG)).config
ifneq ($(KERNEL_EXTRA_CONFIG),)
PRODUCT_SPECIFIC_DEFCONFIGS += $(LJAPDEFCONFIGSRC)/$(KERNEL_EXTRA_CONFIG).config
endif
# build eng kernel for eng and userdebug Android variants
ifneq ($(TARGET_BUILD_VARIANT), user)
ifneq ($(wildcard $(KERNEL_DEBUG_DEFCONFIG)),)
PRODUCT_SPECIFIC_DEFCONFIGS += $(KERNEL_DEBUG_DEFCONFIG)
endif
ifneq ($(KERNEL_EXTRA_CONFIG),)
PRODUCT_SPECIFIC_DEFCONFIGS += $(LJAPDEFCONFIGSRC)/debug-$(KERNEL_EXTRA_CONFIG).config
endif
endif
define do-make-defconfig
$(hide) mkdir -p $(dir $(1))
( perl -le 'print "# This file was automatically generated from:\n#\t" . join("\n#\t", @ARGV) . "\n"' $(2) && cat $(2) ) > $(1) || ( rm -f $(1) && false )
endef
#
# make combined defconfig file
#---------------------------------------
$(TARGET_DEFCONFIG): FORCE $(PRODUCT_SPECIFIC_DEFCONFIGS)
$(call do-make-defconfig,$@,$(PRODUCT_SPECIFIC_DEFCONFIGS))
.PHONY: FORCE
FORCE: