buildgcc: Allow specifying destination directory

With this change you can say

 $ make DEST=/opt/cross-1.35

to get all of the cross toolchain built and installed to /opt/cross-1.35

Change-Id: Icc3e605c4824bfa2831d030e4ed9dd0331ff722f
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13847
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Stefan Reinauer 2016-02-27 12:29:58 -08:00 committed by Martin Roth
parent b7c40630d9
commit 163506a8f6
1 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,6 @@
# if no architecture is specified, set a default # if no architecture is specified, set a default
BUILD_PLATFORM ?= i386-elf BUILD_PLATFORM ?= i386-elf
DEST ?= $(PWD)/xgcc
# For the toolchain builds, use CPUS=x to use multiple processors to build # 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 KEEP_SOURCES=1 to keep temporary files after the build
@ -23,19 +24,20 @@ build_tools: build_gcc build_gdb
build_gcc: build_gcc:
bash ./buildgcc -p $(BUILD_PLATFORM) $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) \ bash ./buildgcc -p $(BUILD_PLATFORM) $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) \
$(if $(BUILD_LANGUAGES),-l $(BUILD_LANGUAGES)) $(if $(BUILD_LANGUAGES),-l $(BUILD_LANGUAGES)) -d $(DEST)
build_gdb: build_gdb:
ifeq ($(SKIP_GDB),) ifeq ($(SKIP_GDB),)
bash ./buildgcc -p $(BUILD_PLATFORM) -P gdb $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) bash ./buildgcc -p $(BUILD_PLATFORM) -P gdb $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) \
$(BUILDGCC_OPTIONS) -d $(DEST)
endif endif
build_iasl: build_iasl:
bash ./buildgcc -P iasl $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) bash ./buildgcc -P iasl $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) -d $(DEST)
build_clang: build_clang:
ifeq ($(SKIP_CLANG),) ifeq ($(SKIP_CLANG),)
bash ./buildgcc -P clang $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) bash ./buildgcc -P clang $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) -d $(DEST)
endif endif
########################################################### ###########################################################