diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2016-01-29 17:48:47 -0800 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2016-02-03 02:22:27 +0100 |
commit | d5779c15eb297bd544ac0dd5144b09e6ac0e9023 (patch) | |
tree | e586df6eae32492fec2179e7d731fcfc44a991c7 | |
parent | 22009a3a582e52d5f78ce9e04705e1888263eeda (diff) | |
download | coreboot-d5779c15eb297bd544ac0dd5144b09e6ac0e9023.tar.xz |
buildgcc: Move all toolchain build targets to util/crossgcc
There is a lot of potential to completely get rid of Makefile
and keep everything in Makefile.inc, but for now this declutters
the main Makefile.inc.
Change-Id: I653313c74207f955514c036c81efcbfd988827c9
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13518
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r-- | Makefile.inc | 88 | ||||
-rw-r--r-- | util/crossgcc/Makefile.inc | 101 |
2 files changed, 103 insertions, 86 deletions
diff --git a/Makefile.inc b/Makefile.inc index 9e7927d52e..175b08bf68 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -474,95 +474,11 @@ gitconfig: git config remote.origin.push HEAD:refs/for/master (git config --global user.name >/dev/null && git config --global user.email >/dev/null) || (printf 'Please configure your name and email in git:\n\n git config --global user.name "Your Name Comes Here"\n git config --global user.email your.email@example.com\n'; exit 1) -help_toolchain help:: - @echo '*** Toolchain targets ***' - @echo ' crossgcc - Build coreboot cross-compilers for all platforms' - @echo ' crosstools - Build coreboot cross-compiler and GDB for all platforms' - @echo ' crossgcc-clean - Remove all built coreboot cross-compilers' - @echo ' iasl - Build coreboot IASL compiler (built by all cross targets)' - @echo ' clang - Build coreboot clang compiler' - @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 ' Use "make [target] CPUS=#" to build toolchain using multiple cores' - @echo - -# For the toolchain builds, use CPUS=x to use multiple processors to build -# use BUILDGCC_OPTIONS= to set any crossgcc command line options -# Example: BUILDGCC_OPTIONS='-t' will keep temporary files after build -crossgcc: clean-for-update - $(MAKE) -C util/crossgcc all_without_gdb SKIP_CLANG=1 - -.PHONY: crossgcc crossgcc-i386 crossgcc-x64 crossgcc-arm crossgcc-aarch64 \ - crossgcc-mips crossgcc-riscv crossgcc-power8 crossgcc-clean iasl \ - clang tools 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 - -crosstools: clean-for-update - $(MAKE) -C util/crossgcc all_with_gdb SKIP_CLANG=1 - -iasl: clean-for-update - $(MAKE) -C util/crossgcc build_iasl - -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 - -crossgcc-clean: clean-for-update - $(MAKE) -C util/crossgcc clean +include util/crossgcc/Makefile.inc +.PHONY: tools tools: $(objutil)/kconfig/conf $(CBFSTOOL) $(FMAPTOOL) $(RMODTOOL) $(objutil)/nvramtool/nvramtool $(ROMCC_BIN) $(objutil)/sconfig/sconfig $(IFDTOOL) $(IFDFAKE) $(CBOOTIMAGE) $(AMDFWTOOL) $(FUTILITY) -test-toolchain: -ifeq ($(COMPILER_OUT_OF_DATE),1) - echo "The coreboot toolchain is not the current version." - $(error ) -else - echo "The coreboot toolchain is the current version." -endif # ifeq ($(COMPILER_OUT_OF_DATE),1) - ########################################################################### # Common recipes for all stages ########################################################################### diff --git a/util/crossgcc/Makefile.inc b/util/crossgcc/Makefile.inc new file mode 100644 index 0000000000..04eb70b996 --- /dev/null +++ b/util/crossgcc/Makefile.inc @@ -0,0 +1,101 @@ +## +## This file is part of the coreboot project. +## +## Copyright (C) 2016 Google Inc. +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## + +help_toolchain help:: + @echo '*** Toolchain targets ***' + @echo ' crossgcc - Build coreboot cross-compilers for all platforms' + @echo ' crosstools - Build coreboot cross-compiler and GDB for all platforms' + @echo ' crossgcc-clean - Remove all built coreboot cross-compilers' + @echo ' iasl - Build coreboot IASL compiler (built by all cross targets)' + @echo ' clang - Build coreboot clang compiler' + @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 ' Use "make [target] CPUS=#" to build toolchain using multiple cores' + @echo + +# For the toolchain builds, use CPUS=x to use multiple processors to build +# use BUILDGCC_OPTIONS= to set any crossgcc command line options +# Example: BUILDGCC_OPTIONS='-t' will keep temporary files after build +crossgcc: clean-for-update + $(MAKE) -C util/crossgcc all_without_gdb SKIP_CLANG=1 + +.PHONY: crossgcc crossgcc-i386 crossgcc-x64 crossgcc-arm crossgcc-aarch64 \ + crossgcc-mips crossgcc-riscv crossgcc-power8 crossgcc-clean iasl \ + 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 + +crosstools: clean-for-update + $(MAKE) -C util/crossgcc all_with_gdb SKIP_CLANG=1 + +iasl: clean-for-update + $(MAKE) -C util/crossgcc build_iasl + +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 + +crossgcc-clean: clean-for-update + $(MAKE) -C util/crossgcc clean + +test-toolchain: +ifeq ($(COMPILER_OUT_OF_DATE),1) + echo "The coreboot toolchain is not the current version." + $(error ) +else + echo "The coreboot toolchain is the current version." +endif # ifeq ($(COMPILER_OUT_OF_DATE),1) |