summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-31 13:37:09 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-08-07 06:13:52 +0200
commitfb60ba388b892518c6a4e599565627bf1fcb8861 (patch)
tree3594ed533497a4de1281cca208d91251d4c928f0 /scripts
parent28ce918d96f5de657e88eb54f87edf441ab2caa5 (diff)
downloadbarebox-fb60ba388b892518c6a4e599565627bf1fcb8861.tar.gz
barebox-fb60ba388b892518c6a4e599565627bf1fcb8861.tar.xz
make: build device trees with obj-dtb-y and pbl-dtb-y
To build an object file from a device tree currently we currently have to add them to the Makefile twice, once to dtb-y and once to obj-y. This patch introduces obj-dtb-y and pbl-dtb-y to directly compile a device tree object file for inclusion in the barebox binary or the pbl respectively. The now unneeded dtb-y targets are removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.lib7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 08518704fe..0a6302ba68 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -14,6 +14,13 @@ obj-m := $(filter-out $(obj-y),$(obj-m))
lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
+pbl-y += $(pbl-dtb-y)
+obj-y += $(obj-dtb-y)
+extra-y += $(patsubst %.dtb.o,%.dtb.S,$(obj-dtb-y))
+extra-y += $(patsubst %.dtb.o,%.dtb,$(obj-dtb-y))
+extra-y += $(patsubst %.dtb.o,%.dtb.S,$(pbl-dtb-y))
+extra-y += $(patsubst %.dtb.o,%.dtb,$(pbl-dtb-y))
+
# Handle objects in subdirs
# ---------------------------------------------------------------------------
# o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o