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-06-28 03:09:05 +02:00
|
|
|
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 $(BUILDJOBS),-j $(BUILDJOBS)) $(BUILDGCC_OPTIONS)
|
|
|
|
|
|
|
|
build_gdb:
|
|
|
|
bash ./buildgcc -p $(BUILD_PLATFORM) -P gdb $(if $(BUILDJOBS),-j $(BUILDJOBS)) $(BUILDGCC_OPTIONS)
|
|
|
|
|
|
|
|
build_iasl:
|
|
|
|
bash ./buildgcc -P iasl $(if $(BUILDJOBS),-j $(BUILDJOBS)) $(BUILDGCC_OPTIONS)
|
|
|
|
|
|
|
|
build_clang:
|
|
|
|
bash ./buildgcc -P clang $(if $(BUILDJOBS),-j $(BUILDJOBS)) $(BUILDGCC_OPTIONS)
|
|
|
|
|
|
|
|
###########################################################
|
|
|
|
### Build with GDB ###
|
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
|
|
|
|
2013-11-01 17:40:39 +01:00
|
|
|
build-armv7a:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools BUILD_PLATFORM=armv7a-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-06-28 03:09:05 +02:00
|
|
|
###########################################################
|
|
|
|
### Build without GDB
|
2013-11-01 17:40:39 +01:00
|
|
|
build-i386-without-gdb:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=i386-elf
|
2013-11-01 17:40:39 +01:00
|
|
|
|
2015-03-13 22:50:22 +01:00
|
|
|
build-x64-without-gdb:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=x86_64-elf
|
2015-03-13 22:50:22 +01:00
|
|
|
|
2013-11-01 17:40:39 +01:00
|
|
|
build-armv7a-without-gdb:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=armv7a-eabi
|
2011-06-09 05:04:20 +02:00
|
|
|
|
2014-11-19 18:36:37 +01:00
|
|
|
build-aarch64-without-gdb:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=aarch64-elf
|
2014-11-19 18:36:37 +01:00
|
|
|
|
2014-05-27 16:18:42 +02:00
|
|
|
build-mips-without-gdb:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=mipsel-elf
|
2014-05-27 16:18:42 +02:00
|
|
|
|
2015-03-07 10:57:25 +01:00
|
|
|
build-riscv-without-gdb:
|
2015-06-28 03:09:05 +02:00
|
|
|
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=riscv-elf
|
2015-03-07 10:57:25 +01:00
|
|
|
|
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
|
|
|
|
|
2015-06-28 03:09:05 +02:00
|
|
|
.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
|