summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-01-30 09:14:45 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2016-02-03 02:40:11 +0100
commit6c0ccfb10d9f2785832b98734b00993ec19e8611 (patch)
treef52eff127d25c9a037c6c064415a29ac866c2bdf /util
parentd5779c15eb297bd544ac0dd5144b09e6ac0e9023 (diff)
downloadcoreboot-6c0ccfb10d9f2785832b98734b00993ec19e8611.tar.xz
crossgcc/Makefile.inc: deduplicate cross*-$arch rules
Change-Id: Idee4eb5d112e3f6bffced0681e9112101bed6763 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13524 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/crossgcc/Makefile.inc48
1 files changed, 7 insertions, 41 deletions
diff --git a/util/crossgcc/Makefile.inc b/util/crossgcc/Makefile.inc
index 04eb70b996..bd1b0cd2a9 100644
--- a/util/crossgcc/Makefile.inc
+++ b/util/crossgcc/Makefile.inc
@@ -13,6 +13,8 @@
## GNU General Public License for more details.
##
+TOOLCHAIN_ARCHES := i386 x86 arm aarch64 mips riscv power8
+
help_toolchain help::
@echo '*** Toolchain targets ***'
@echo ' crossgcc - Build coreboot cross-compilers for all platforms'
@@ -23,7 +25,7 @@ help_toolchain help::
@echo ' test-toolchain - Reports if toolchain components are out of date'
@echo ' crossgcc-ARCH - Build cross-compiler for specific architecture'
@echo ' crosstools-ARCH - Build cross-compiler with GDB for specific architecture'
- @echo ' ARCH can be "i386", "x64", "arm", "aarch64", "mips", "riscv", or "power8"'
+ @echo ' ARCH can be "$(subst $(spc),"$(comma) ",$(TOOLCHAIN_ARCHES))"'
@echo ' Use "make [target] CPUS=#" to build toolchain using multiple cores'
@echo
@@ -38,26 +40,8 @@ crossgcc: clean-for-update
clang crosstools-i386 crosstools-x64 crosstools-arm \
crosstools-aarch64 crosstools-mips crosstools-riscv crosstools-power8
-crossgcc-i386: clean-for-update
- $(MAKE) -C util/crossgcc build-i386 SKIP_GDB=1
-
-crossgcc-x64: clean-for-update
- $(MAKE) -C util/crossgcc build-x64 SKIP_GDB=1
-
-crossgcc-arm: clean-for-update
- $(MAKE) -C util/crossgcc build-arm SKIP_GDB=1
-
-crossgcc-aarch64: clean-for-update
- $(MAKE) -C util/crossgcc build-aarch64 SKIP_GDB=1
-
-crossgcc-mips: clean-for-update
- $(MAKE) -C util/crossgcc build-mips SKIP_GDB=1
-
-crossgcc-riscv: clean-for-update
- $(MAKE) -C util/crossgcc build-riscv SKIP_GDB=1
-
-crossgcc-power8: clean-for-update
- $(MAKE) -C util/crossgcc build-power8 SKIP_GDB=1
+$(foreach arch,$(TOOLCHAIN_ARCHES),crossgcc-$(arch)): clean-for-update
+ $(MAKE) -C util/crossgcc $(patsubst crossgcc-%,build-%,$@) SKIP_GDB=1
crosstools: clean-for-update
$(MAKE) -C util/crossgcc all_with_gdb SKIP_CLANG=1
@@ -68,26 +52,8 @@ iasl: clean-for-update
clang: clean-for-update
$(MAKE) -C util/crossgcc build_clang
-crosstools-i386: clean-for-update
- $(MAKE) -C util/crossgcc build-i386
-
-crosstools-x64: clean-for-update
- $(MAKE) -C util/crossgcc build-x64
-
-crosstools-arm: clean-for-update
- $(MAKE) -C util/crossgcc build-arm
-
-crosstools-aarch64: clean-for-update
- $(MAKE) -C util/crossgcc build-aarch64
-
-crosstools-mips: clean-for-update
- $(MAKE) -C util/crossgcc build-mips
-
-crosstools-riscv: clean-for-update
- $(MAKE) -C util/crossgcc build-riscv
-
-crosstools-power8: clean-for-update
- $(MAKE) -C util/crossgcc build-power8
+$(foreach arch,$(TOOLCHAIN_ARCHES),crosstools-$(arch)): clean-for-update
+ $(MAKE) -C util/crossgcc $(patsubst crosstools-%,build-%,$@)
crossgcc-clean: clean-for-update
$(MAKE) -C util/crossgcc clean