include/stdint.h: Remove old reference to ROMCC
[coreboot.git] / util / crossgcc / Makefile
blobdb8b76928715562ccd7748966cfcf928f5e7a2c0
1 # if no architecture is specified, set a default
2 BUILD_PLATFORM ?= i386-elf
3 DEST ?= $(CURDIR)/xgcc
5 # For the toolchain builds, use CPUS=x to use multiple processors to build
6 # use KEEP_SOURCES=1 to keep temporary files after the build
7 # use BUILDGCC_OPTIONS= to set any other crossgcc command line options
8 # Example: BUILDGCC_OPTIONS=-c to remove temporary files before build
10 all all_with_gdb:
11 $(MAKE) build-i386 build-x64 build-arm \
12 build-riscv build-aarch64 build-ppc64 build-nds32le \
13 build_clang build_iasl build_make build_nasm
15 all_without_gdb:
16 $(MAKE) SKIP_GDB=1 build-i386 build-x64 build-arm \
17 build-riscv build-aarch64 build-ppc64 build-nds32le \
18 build_clang build_iasl build_make build_nasm
20 build_tools: build_gcc build_gdb
22 ###########################################################
23 ### targets to do buildgcc builds
25 build_gcc:
26 bash ./buildgcc -p $(BUILD_PLATFORM) $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) \
27 $(if $(BUILD_LANGUAGES),-l $(BUILD_LANGUAGES)) -d $(DEST)
29 build_gdb:
30 ifeq ($(SKIP_GDB),)
31 bash ./buildgcc -p $(BUILD_PLATFORM) -P gdb $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) \
32 $(BUILDGCC_OPTIONS) -d $(DEST)
33 endif
35 build_iasl:
36 bash ./buildgcc -P iasl $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) -d $(DEST)
38 build_clang:
39 ifeq ($(SKIP_CLANG),)
40 bash ./buildgcc -P clang $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) -d $(DEST)
41 endif
43 build_make:
44 bash ./buildgcc -P make $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) -d $(DEST)
46 build_nasm:
47 bash ./buildgcc -P nasm $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) -d $(DEST)
49 ###########################################################
50 build-i386:
51 @$(MAKE) build_tools build_nasm BUILD_PLATFORM=i386-elf
53 build-x64:
54 @$(MAKE) build_tools build_nasm BUILD_PLATFORM=x86_64-elf
56 build-arm:
57 @$(MAKE) build_tools BUILD_PLATFORM=arm-eabi
59 build-aarch64:
60 @$(MAKE) build_tools BUILD_PLATFORM=aarch64-elf
62 build-riscv:
63 # GDB is currently not supported on RISC-V
64 @$(MAKE) build_gcc BUILD_PLATFORM=riscv-elf
66 build-ppc64:
67 @$(MAKE) build_tools BUILD_PLATFORM=powerpc64-linux-gnu
69 build-nds32le:
70 @$(MAKE) build_tools BUILD_PLATFORM=nds32le-elf
72 clean_tempfiles:
73 rm -rf build-*
74 rm -rf binutils-* gcc-* gmp-* mpc-* mpfr-*
75 rm -rf llvm-* clang-tools-* cfe-* compiler-rt-*
76 rm -rf acpica-*
77 rm -rf gdb-*
78 rm -f getopt
80 clean: clean_tempfiles
81 rm -rf xgcc
83 distclean: clean
84 rm -rf tarballs
86 .PHONY: build_gcc build_iasl build_gdb build_clang all all_with_gdb \
87 all_without_gdb build_tools build-i386 build-x64 build-arm \
88 build-aarch64 build-riscv build-ppc64 build-nds32le build-nasm \
89 clean distclean clean_tempfiles
90 .NOTPARALLEL: