2015-06-28 03:09:05 +02:00
|
|
|
# if no architecture is specified, set a default
|
|
|
|
BUILD_PLATFORM ?= i386-elf
|
2011-05-16 03:35:03 +02:00
|
|
|
|
2015-10-27 22:03:46 +01:00
|
|
|
# For the toolchain builds, use CPUS=x to use multiple processors to build
|
|
|
|
# use KEEP_SOURCES=1 to keep temporary files after the build
|
|
|
|
# use BUILDGCC_OPTIONS= to set any other crossgcc command line options
|
|
|
|
# Example: BUILDGCC_OPTIONS=-c to remove temporary files before build
|
|
|
|
|
|
|
|
all all_with_gdb:
|
|
|
|
$(MAKE) build-i386
|
|
|
|
$(MAKE) SKIP_IASL=1 \
|
|
|
|
build-x64 build-armv7a build-mips build-riscv build-aarch64 \
|
|
|
|
build_clang
|
2015-06-28 03:09:05 +02:00
|
|
|
|
|
|
|
all_without_gdb:
|
2015-10-27 22:03:46 +01:00
|
|
|
$(MAKE) SKIP_GDB=1 build-i386
|
|
|
|
$(MAKE) SKIP_IASL=1 SKIP_GDB=1 \
|
|
|
|
build-x64 build-armv7a build-mips build-riscv build-aarch64 \
|
|
|
|
build_clang
|
2015-06-28 03:09:05 +02:00
|
|
|
|
|
|
|
build_tools: build_gcc build_iasl build_gdb
|
|
|
|
|
|
|
|
###########################################################
|
|
|
|
### targets to do buildgcc builds
|
|
|
|
|
|
|
|
build_gcc:
|
2015-10-27 22:03:46 +01:00
|
|
|
bash ./buildgcc -p $(BUILD_PLATFORM) $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) \
|
2015-09-08 12:30:27 +02:00
|
|
|
$(if $(BUILD_LANGUAGES),-l $(BUILD_LANGUAGES))
|
2015-06-28 03:09:05 +02:00
|
|
|
|
|
|
|
build_gdb:
|
2015-10-27 22:03:46 +01:00
|
|
|
ifeq ($(SKIP_GDB),)
|
|
|
|
bash ./buildgcc -p $(BUILD_PLATFORM) -P gdb $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS)
|
|
|
|
endif
|
2015-06-28 03:09:05 +02:00
|
|
|
|
|
|
|
build_iasl:
|
2015-10-27 22:03:46 +01:00
|
|
|
ifeq ($(SKIP_IASL),)
|
|
|
|
bash ./buildgcc -P iasl $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS)
|
|
|
|
endif
|
2015-06-28 03:09:05 +02:00
|
|
|
|
|
|
|
build_clang:
|
2015-10-27 22:03:46 +01:00
|
|
|
ifeq ($(SKIP_CLANG),)
|
|
|
|
bash ./buildgcc -P clang $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS)
|
|
|
|
endif
|
2015-06-28 03:09:05 +02:00
|
|
|
|
|
|
|
###########################################################
|
2013-11-01 17:40:39 +01:00
|
|
|
build-i386:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools BUILD_PLATFORM=i386-elf
|
2013-11-01 17:40:39 +01:00
|
|
|
|
2015-03-13 22:50:22 +01:00
|
|
|
build-x64:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools BUILD_PLATFORM=x86_64-elf
|
2015-03-13 22:50:22 +01:00
|
|
|
|
2016-01-30 02:39:07 +01:00
|
|
|
build-arm:
|
|
|
|
@$(MAKE) build_tools BUILD_PLATFORM=arm-eabi
|
2011-05-16 03:35:03 +02:00
|
|
|
|
2014-11-19 18:36:37 +01:00
|
|
|
build-aarch64:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools BUILD_PLATFORM=aarch64-elf
|
2014-11-19 18:36:37 +01:00
|
|
|
|
2014-05-27 16:18:42 +02:00
|
|
|
build-mips:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools BUILD_PLATFORM=mipsel-elf
|
2014-05-27 16:18:42 +02:00
|
|
|
|
2015-03-10 20:24:34 +01:00
|
|
|
build-riscv:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools BUILD_PLATFORM=riscv-elf
|
2015-03-07 10:57:25 +01:00
|
|
|
|
2015-12-31 01:59:00 +01:00
|
|
|
build-power8:
|
|
|
|
@$(MAKE) build_tools BUILD_PLATFORM=powerpc64le-linux-gnu
|
|
|
|
|
2016-01-30 02:39:07 +01:00
|
|
|
build-nds32le:
|
|
|
|
@$(MAKE) build_tools BUILD_PLATFORM=nds32le-elf
|
|
|
|
|
2015-06-28 03:09:05 +02:00
|
|
|
clean_tempfiles:
|
2015-06-21 21:05:03 +02:00
|
|
|
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-*
|
2015-08-27 04:00:31 +02:00
|
|
|
rm -f getopt
|
2011-05-16 03:35:03 +02:00
|
|
|
|
2015-06-28 03:09:05 +02:00
|
|
|
clean: clean_tempfiles
|
|
|
|
rm -rf xgcc
|
|
|
|
|
2015-06-21 21:05:03 +02:00
|
|
|
distclean: clean
|
|
|
|
rm -rf tarballs
|
|
|
|
|
2016-01-30 02:39:07 +01:00
|
|
|
.PHONY: build_gcc build_iasl build_gdb build_clang all all_with_gdb \
|
|
|
|
all_without_gdb build_tools build-i386 build-x64 build-arm \
|
|
|
|
build-aarch64 build-mips build-riscv build-power8 build-nds32le \
|
2015-10-27 22:03:46 +01:00
|
|
|
clean distclean clean_tempfiles
|