coreboot-kgpe-d16/util/crossgcc/Makefile
Martin Roth 11bee4019a buildgcc: change -j variable name from BUILDJOBS to CPUS
The buildgcc makefile was using the variable 'BUILDJOBS' to pass the
number of cores to use for the build into buildgcc.  This is changed
to 'CPUS' to match the variable name for the what-jenkins-does target.

Change-Id: I373c4988e9f096ca2e142afdd5e94d7d806891e3
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12299
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-04 21:40:06 +01:00

91 lines
2.6 KiB
Makefile

# if no architecture is specified, set a default
BUILD_PLATFORM ?= i386-elf
all:
$(MAKE) BUILDGCC_OPTIONS=-t build-i386 build-x64 build-armv7a build-mips build-riscv build-aarch64 \
build_clang
$(MAKE) clean_tempfiles
all_without_gdb:
$(MAKE) BUILDGCC_OPTIONS=-t build-i386-without-gdb build-x64-without-gdb build-armv7a-without-gdb \
build-mips-without-gdb build-riscv-without-gdb build-aarch64-without-gdb build_clang
$(MAKE) clean_tempfiles
build_tools: build_gcc build_iasl build_gdb
build_tools_without_gdb: build_gcc build_iasl
###########################################################
### targets to do buildgcc builds
build_gcc:
bash ./buildgcc -p $(BUILD_PLATFORM) $(if $(CPUS),-j $(CPUS)) $(BUILDGCC_OPTIONS) \
$(if $(BUILD_LANGUAGES),-l $(BUILD_LANGUAGES))
build_gdb:
bash ./buildgcc -p $(BUILD_PLATFORM) -P gdb $(if $(CPUS),-j $(CPUS)) $(BUILDGCC_OPTIONS)
build_iasl:
bash ./buildgcc -P iasl $(if $(CPUS),-j $(CPUS)) $(BUILDGCC_OPTIONS)
build_clang:
bash ./buildgcc -P clang $(if $(CPUS),-j $(CPUS)) $(BUILDGCC_OPTIONS)
###########################################################
### Build with GDB ###
build-i386:
@$(MAKE) build_tools BUILD_PLATFORM=i386-elf
build-x64:
@$(MAKE) build_tools BUILD_PLATFORM=x86_64-elf
build-armv7a:
@$(MAKE) build_tools BUILD_PLATFORM=armv7a-eabi
build-aarch64:
@$(MAKE) build_tools BUILD_PLATFORM=aarch64-elf
build-mips:
@$(MAKE) build_tools BUILD_PLATFORM=mipsel-elf
build-riscv:
@$(MAKE) build_tools BUILD_PLATFORM=riscv-elf
###########################################################
### Build without GDB
build-i386-without-gdb:
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=i386-elf
build-x64-without-gdb:
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=x86_64-elf
build-armv7a-without-gdb:
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=armv7a-eabi
build-aarch64-without-gdb:
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=aarch64-elf
build-mips-without-gdb:
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=mipsel-elf
build-riscv-without-gdb:
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=riscv-elf
clean_tempfiles:
rm -rf build-*
rm -rf binutils-* gcc-* gmp-* libelf-* mpc-* mpfr-*
rm -rf llvm-* clang-tools-* cfe-* compiler-rt-*
rm -rf acpica-*
rm -rf gdb-*
rm -f getopt
clean: clean_tempfiles
rm -rf xgcc
distclean: clean
rm -rf tarballs
.PHONY: build_gcc build_iasl build_gdb build_tools build_tools_without_gdb \
build-i386-without-gdb build-x64-without-gdb build-armv7a-without-gdb \
build-aarch64-without-gdb build-mips-without-gdb build-riscv-without-gdb \
all build clean distclean clean_tempfiles all_without_gdb