summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-02-04 17:24:18 +0900
committerTom Rini <trini@ti.com>2014-02-19 11:07:50 -0500
commitbf4b3de1013c1643ffb8f071292c0f0eabb265c3 (patch)
tree6076ce8b6f342fedcd3c64c26a63d7055f579188 /scripts
parentceec4c8746567a0be70147f2c6f25e767347b0a0 (diff)
kbuild: Use Kbuild.include
This commit adjusts some files to use Kbuild.include. - Use cc-option defined in Kbuild.include (Delete cc-option in config.mk) - Use cc-version defined in (Delete cc-version in config.mk) - Move binutils-version and dtc-version to Kbuild.include by analogy to cc-version This commit also adds srctree (same as SRCTREE) to use Kbuild scripts. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include8
-rw-r--r--scripts/Makefile.build1
2 files changed, 8 insertions, 1 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 547e15daf03..ca5fd56ca25 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -140,6 +140,10 @@ cc-fullversion = $(shell $(CONFIG_SHELL) \
# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3))
+# added for U-Boot
+binutils-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/binutils-version.sh $(AS))
+dtc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/dtc-version.sh $(DTC))
+
# cc-ldoption
# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
cc-ldoption = $(call try-run,\
@@ -161,7 +165,9 @@ ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2))
# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
# Usage:
# $(Q)$(MAKE) $(build)=dir
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
+#build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
+# temporary
+build := -f $(srctree)/scripts/Makefile.build -C
###
# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj=
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 1b3d77fea24..7789efab82c 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -2,6 +2,7 @@
.PHONY: all
all:
+include $(srctree)/scripts/Kbuild.include
include $(TOPDIR)/config.mk
# variable LIB is used in examples/standalone/Makefile