From: Felix Fietkau Date: Thu, 14 Mar 2013 00:22:25 +0000 (+0100) Subject: toolchain: rewrite the build system to allow parallelizing builds X-Git-Tag: 1.3.2~1^2~2 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=7db9c11e03d62fd10d206e01b708d8d761c413bb;p=open-ath9k-htc-firmware.git toolchain: rewrite the build system to allow parallelizing builds Use stampfiles for builds and proper dependencies to allow running make with -j. The jobserver is also passed to the package make processes to further optimize build time. Signed-off-by: Felix Fietkau --- diff --git a/Makefile b/Makefile index 81f4500..b7738dd 100644 --- a/Makefile +++ b/Makefile @@ -1,89 +1,136 @@ GMP_VER=5.0.5 GMP_URL=http://ftp.gnu.org/gnu/gmp/gmp-$(GMP_VER).tar.bz2 GMP_TAR=gmp-$(GMP_VER).tar.bz2 +GMP_DIR=gmp-$(GMP_VER) MPFR_VER=3.1.1 MPFR_URL=http://ftp.gnu.org/gnu/mpfr/mpfr-$(MPFR_VER).tar.bz2 MPFR_TAR=mpfr-$(MPFR_VER).tar.bz2 +MPFR_DIR=mpfr-$(MPFR_VER) MPC_VER=1.0.1 MPC_URL=http://ftp.gnu.org/gnu/mpc/mpc-$(MPC_VER).tar.gz MPC_TAR=mpc-$(MPC_VER).tar.gz +MPC_DIR=mpc-$(MPC_VER) BINUTILS_VER=2.23.1 BINUTILS_URL=http://ftp.gnu.org/gnu/binutils/binutils-$(BINUTILS_VER).tar.bz2 BINUTILS_TAR=binutils-$(BINUTILS_VER).tar.bz2 +BINUTILS_DIR=binutils-$(BINUTILS_VER) +BINUTILS_PATCHES=local/patches/binutils.patch GCC_VER=4.7.2 GCC_URL=http://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VER)/gcc-$(GCC_VER).tar.bz2 GCC_TAR=gcc-$(GCC_VER).tar.bz2 +GCC_DIR=gcc-$(GCC_VER) +GCC_PATCHES=local/patches/gcc.patch BASEDIR=$(shell pwd) TOOLCHAIN_DIR=$(BASEDIR)/toolchain TARGET=xtensa-elf +DL_DIR=$(TOOLCHAIN_DIR)/dl +BUILD_DIR=$(TOOLCHAIN_DIR)/build all: toolchain -gmp-$(GMP_VER): - wget -N -P $(TOOLCHAIN_DIR)/dl $(GMP_URL) - tar -C $(TOOLCHAIN_DIR)/dl -xjf $(TOOLCHAIN_DIR)/dl/$(GMP_TAR) - -gmp: gmp-$(GMP_VER) - mkdir -p $(TOOLCHAIN_DIR)/build/gmp - cd $(TOOLCHAIN_DIR)/build/gmp; \ - $(TOOLCHAIN_DIR)/dl/$