aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-05-11 09:07:21 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-05-11 09:07:21 +0000
commit9c26eee61fdda0e961e9715fcec140e5a4cce889 (patch)
tree9314aabf4449785f4847505ce4ef638ff54cac06 /include
parent75338cb7726a98984a336eda0d83d013c36d088a (diff)
downloadupstream-9c26eee61fdda0e961e9715fcec140e5a4cce889.tar.gz
upstream-9c26eee61fdda0e961e9715fcec140e5a4cce889.tar.bz2
upstream-9c26eee61fdda0e961e9715fcec140e5a4cce889.zip
build: add support for adding a per-device compile step in the new image building code
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45670 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/image.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/image.mk b/include/image.mk
index a6237ff2e2..4161d60ded 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -359,6 +359,7 @@ endef
define Device/Check
_TARGET = $$(if $$(filter $(PROFILE),$$(PROFILES)),install,install-disabled)
+ _COMPILE_TARGET = $$(if $(CONFIG_IB)$$(filter $(PROFILE),$$(PROFILES)),compile,compile-disabled)
endef
define Device/Build/initramfs
@@ -379,6 +380,14 @@ define Device/Build/check_size
}
endef
+define Device/Build/compile
+ $$(_COMPILE_TARGET): $(KDIR)/$(1)
+ $(eval $(call Device/Export,$(KDIR)/$(1)))
+ $(KDIR)/$(1):
+ $$(call concat_cmd,$(COMPILE/$(1)))
+
+endef
+
define Device/Build/kernel
_KERNEL_IMAGES += $(KDIR)/$$(KERNEL_NAME)
$(KDIR)/$$(KERNEL_NAME): image_prepare
@@ -411,6 +420,9 @@ define Device/Build
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1)))
$(call Device/Build/kernel,$(1))
+ $$(eval $$(foreach compile,$$(COMPILE), \
+ $$(call Device/Build/compile,$$(compile),$(1))))
+
$$(eval $$(foreach image,$$(IMAGES), \
$$(foreach fs,$$(filter $(TARGET_FILESYSTEMS),$$(FILESYSTEMS)), \
$$(call Device/Build/image,$$(fs),$$(image),$(1)))))