summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-07-22 14:53:23 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-07-22 16:17:06 +0200
commit88c0f38e19486dcd28bd4d8bae3f9ddce9ff6ec6 (patch)
tree80b1225de4b202ee9b335bf7b30ca3a615da025a /scripts/Makefile.lib
parentcf7c8f37d6c65c5fa9ab89c8a7001faf18bda319 (diff)
downloadbarebox-88c0f38e19486dcd28bd4d8bae3f9ddce9ff6ec6.tar.gz
barebox-88c0f38e19486dcd28bd4d8bae3f9ddce9ff6ec6.tar.xz
scripts: run imxcfg files through cpp
To allow defines and includes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index ab12a38c84..ffc9e511fe 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -319,8 +319,13 @@ cmd_imximage_S_dcd= \
echo '.balign STRUCT_ALIGNMENT'; \
) > $@
+imxcfg_cpp_flags = -Wp,-MD,$(depfile) -nostdinc -x assembler-with-cpp
+
+dcd-tmp = $(subst $(comma),_,$(dot-target).dcd.tmp)
+
quiet_cmd_dcd = DCD $@
- cmd_dcd = $(objtree)/scripts/imx/imx-image -d -o $@ -c $<
+ cmd_dcd = $(CPP) $(imxcfg_cpp_flags) -o $(dcd-tmp) $< ; \
+ $(objtree)/scripts/imx/imx-image -d -o $@ -c $(dcd-tmp)
$(obj)/%.dcd: $(obj)/%.imxcfg FORCE
$(call if_changed,dcd)
@@ -328,5 +333,8 @@ $(obj)/%.dcd: $(obj)/%.imxcfg FORCE
$(obj)/%.dcd.S: $(obj)/%.dcd
$(call cmd,imximage_S_dcd)
+imximg-tmp = $(subst $(comma),_,$(dot-target).imxcfg.tmp)
+
quiet_cmd_imx_image = IMX-IMG $@
- cmd_imx_image = $(objtree)/scripts/imx/imx-image -b -c $(CFG_$(@F)) -f $< -o $@
+ cmd_imx_image = $(CPP) $(imxcfg_cpp_flags) -o $(imximg-tmp) $(CFG_$(@F)) ; \
+ $(objtree)/scripts/imx/imx-image -o $@ -b -c $(imximg-tmp) -f $<