diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-02-05 14:06:28 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2013-02-08 09:38:07 -0500 |
commit | 22435f38337ef6a8abb33574604e77c335b75d14 (patch) | |
tree | 74b2748ef47b5f126113911d7585f5b47ab80b2b /scripts/Makefile.lib | |
parent | 1d0b1c74ed22d2614ae9206febf956f0b22c81a5 (diff) |
kbuild: create a rule to run the pre-processor on *.dts files
Create cmd_dtc_cpp to run the C pre-processor on *.dts file before
passing them to dtc for final compilation. This allows the use of #define
and #include within the .dts file.
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Michal Marek <mmarek@suse.cz>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r-- | scripts/Makefile.lib | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index bdf42fdf64c9..7910229ec665 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -269,6 +269,16 @@ cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile | |||
269 | $(obj)/%.dtb: $(src)/%.dts FORCE | 269 | $(obj)/%.dtb: $(src)/%.dts FORCE |
270 | $(call if_changed_dep,dtc) | 270 | $(call if_changed_dep,dtc) |
271 | 271 | ||
272 | dtc-tmp = $(subst $(comma),_,$(dot-target).dts) | ||
273 | |||
274 | quiet_cmd_dtc_cpp = DTC+CPP $@ | ||
275 | cmd_dtc_cpp = $(CPP) $(cpp_flags) -x assembler-with-cpp -undef -D__DTS__ \ | ||
276 | -o $(dtc-tmp) $< ; \ | ||
277 | $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) $(dtc-tmp) | ||
278 | |||
279 | $(obj)/%.dtb: $(src)/%.dtsp FORCE | ||
280 | $(call if_changed_dep,dtc_cpp) | ||
281 | |||
272 | # Bzip2 | 282 | # Bzip2 |
273 | # --------------------------------------------------------------------------- | 283 | # --------------------------------------------------------------------------- |
274 | 284 | ||