all: linux-headers libgmp libmpfr libmpc binutils gcc-static glibc gcc-final setup test
clean: linux-headers-clean libgmp-clean libmpfr-clean libmpc-clean binutils-clean gcc-static-clean glibc-clean gcc-final-clean test-clean
- rm -rvf $(CROSSTOOLS) $(CLFS)
+ rm -rf $(CROSSTOOLS) $(CLFS)
distclean: clean linux-headers-distclean libgmp-distclean libmpfr-distclean libmpc-distclean binutils-distclean gcc-static-distclean glibc-distclean gcc-final-distclean test-distclean
wget -P $(WORK) -c ftp://ftp.kernel.org/pub/linux/kernel/v4.x/linux-$(KERNEL_HEADERS_VERSION).tar.xz
$(WORK)/linux-$(KERNEL_HEADERS_VERSION): $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.xz
- tar -C $(WORK) -xvf $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.xz
+ tar -C $(WORK) -xf $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.xz
touch $(WORK)/linux-$(KERNEL_HEADERS_VERSION)
$(CLFS)/usr/include/asm: $(WORK)/linux-$(KERNEL_HEADERS_VERSION)
linux-headers: $(CLFS)/usr/include/asm
linux-headers-clean:
- rm -vrf $(WORK)/linux-$(KERNEL_HEADERS_VERSION)
+ rm -rf $(WORK)/linux-$(KERNEL_HEADERS_VERSION)
linux-headers-distclean: linux-headers-clean
- rm -vf $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.xz
+ rm -f $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.xz
# LIBGMP
wget -P $(WORK) -c ftp://ftp.gnu.org/gnu/gmp/gmp-$(LIBGMP_VERSION).tar.bz2
$(WORK)/gmp-$(LIBGMP_VERSION): $(WORK)/gmp-$(LIBGMP_VERSION).tar.bz2
- tar -C $(WORK) -xvjf $(WORK)/gmp-$(LIBGMP_VERSION).tar.bz2
- mv `find $(WORK) -type d -name 'gmp-*'` $(WORK)/gmp-$(LIBGMP_VERSION)
+ tar -C $(WORK) -xjf $(WORK)/gmp-$(LIBGMP_VERSION).tar.bz2
touch $(WORK)/gmp-$(LIBGMP_VERSION)
$(WORK)/build-libgmp: $(WORK)/gmp-$(LIBGMP_VERSION)
libgmp: $(CROSSTOOLS)/lib/libgmp.so
libgmp-clean:
- rm -vrf $(WORK)/build-libgmp $(WORK)/gmp-$(LIBGMP_VERSION)
+ rm -rf $(WORK)/build-libgmp $(WORK)/gmp-$(LIBGMP_VERSION)
libgmp-distclean: libgmp-clean
- rm -vrf $(WORK)/gmp-$(LIBGMP_VERSION).tar.bz2
+ rm -rf $(WORK)/gmp-$(LIBGMP_VERSION).tar.bz2
# LIBMPFR
wget -P $(WORK) -c http://ftp.gnu.org/gnu/mpfr/mpfr-$(LIBMPFR_VERSION).tar.bz2
$(WORK)/mpfr-$(LIBMPFR_VERSION): $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2
- tar -C $(WORK) -xvjf $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2
+ tar -C $(WORK) -xjf $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2
touch $(WORK)/mpfr-$(LIBMPFR_VERSION)
$(WORK)/build-libmpfr: $(WORK)/mpfr-$(LIBMPFR_VERSION)
libmpfr: $(CROSSTOOLS)/lib/libmpfr.so
libmpfr-clean:
- rm -vrf $(WORK)/build-libmpfr $(WORK)/mpfr-$(LIBMPFR_VERSION)
+ rm -rf $(WORK)/build-libmpfr $(WORK)/mpfr-$(LIBMPFR_VERSION)
libmpfr-distclean: libmpfr-clean
- rm -vrf $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2
+ rm -rf $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2
# LIBMPC
wget -P $(WORK) -c http://www.multiprecision.org/mpc/download/mpc-$(LIBMPC_VERSION).tar.gz
$(WORK)/mpc-$(LIBMPC_VERSION): $(WORK)/mpc-$(LIBMPC_VERSION).tar.gz
- tar -C $(WORK) -xvzf $(WORK)/mpc-$(LIBMPC_VERSION).tar.gz
+ tar -C $(WORK) -xzf $(WORK)/mpc-$(LIBMPC_VERSION).tar.gz
touch $(WORK)/mpc-$(LIBMPC_VERSION)
$(WORK)/build-libmpc: $(WORK)/mpc-$(LIBMPC_VERSION)
libmpc: $(CROSSTOOLS)/lib/libmpc.so
libmpc-clean:
- rm -vrf $(WORK)/build-libmpc $(WORK)/mpc-$(LIBMPC_VERSION)
+ rm -rf $(WORK)/build-libmpc $(WORK)/mpc-$(LIBMPC_VERSION)
libmpc-distclean: libmpc-clean
- rm -vrf $(WORK)/mpc-$(LIBMPC_VERSION).tar.bz2
+ rm -rf $(WORK)/mpc-$(LIBMPC_VERSION).tar.bz2
# BINUTILS
wget -P $(WORK) -c ftp://ftp.gnu.org/gnu/binutils/binutils-$(BINUTILS_VERSION).tar.bz2
$(WORK)/binutils-$(BINUTILS_VERSION): $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2
- tar -C $(WORK) -xvf $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2
+ tar -C $(WORK) -xf $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2
sed -i '/^SUBDIRS/s/doc//' $(WORK)/binutils-$(BINUTILS_VERSION)/*/Makefile.in
touch $(WORK)/binutils-$(BINUTILS_VERSION)
binutils: linux-headers $(CLFS)/usr/include/libiberty.h
binutils-clean:
- rm -vrf $(WORK)/build-binutils $(WORK)/binutils-$(BINUTILS_VERSION)
+ rm -rf $(WORK)/build-binutils $(WORK)/binutils-$(BINUTILS_VERSION)
binutils-distclean: binutils-clean
rm -f $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2
wget -P $(WORK) -c ftp://gcc.gnu.org/pub/gcc/releases/gcc-$(GCC_VERSION)/gcc-$(GCC_VERSION).tar.bz2
$(WORK)/gcc-$(GCC_VERSION): $(WORK)/gcc-$(GCC_VERSION).tar.bz2
- tar -C $(WORK) -xvjf $(WORK)/gcc-$(GCC_VERSION).tar.bz2
+ tar -C $(WORK) -xjf $(WORK)/gcc-$(GCC_VERSION).tar.bz2
touch $(WORK)/gcc-$(GCC_VERSION)
$(WORK)/build-gcc-static: $(WORK)/gcc-$(GCC_VERSION)
--without-headers --enable-__cxa_atexit --enable-symvers=gnu --disable-decimal-float \
--disable-libgomp --disable-libmudflap --disable-libssp \
--with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) \
- --disable-shared --disable-threads --enable-languages=c --disable-libquadmath \
+ --disable-shared --disable-threads --enable-languages=c --disable-libquadmath && \
make $(MJ) all-gcc all-target-libgcc && make install-gcc install-target-libgcc || exit 1
touch $(CROSSTOOLS)/lib/gcc
gcc-static: linux-headers libgmp libmpfr binutils $(CROSSTOOLS)/lib/gcc
gcc-static-clean:
- rm -vrf $(WORK)/build-gcc-static $(WORK)/gcc-$(GCC_VERSION)
+ rm -rf $(WORK)/build-gcc-static $(WORK)/gcc-$(GCC_VERSION)
gcc-static-distclean: gcc-static-clean
- rm -vf $(WORK)/gcc-$(GCC_VERSION).tar.bz2
+ rm -f $(WORK)/gcc-$(GCC_VERSION).tar.bz2
# GLIBC
wget -P $(WORK) -c ftp://ftp.gnu.org/gnu/glibc/glibc-$(GLIBC_VERSION).tar.bz2
$(WORK)/glibc-$(GLIBC_VERSION): $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2
- tar -C $(WORK) -xvjf $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2
+ tar -C $(WORK) -xjf $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2
touch $(WORK)/glibc-$(GLIBC_VERSION)
$(WORK)/build-glibc: $(WORK)/glibc-$(GLIBC_VERSION)
glibc: binutils gcc-static $(CLFS)/usr/lib64/libc.so
glibc-clean:
- rm -vrf $(WORK)/build-glibc $(WORK)/glibc-$(GLIBC_VERSION)
+ rm -rf $(WORK)/build-glibc $(WORK)/glibc-$(GLIBC_VERSION)
glibc-distclean: glibc-clean
- rm -vf $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2 $(WORK)/glibc-ports-$(GLIBC_VERSION).tar.bz2
+ rm -f $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2 $(WORK)/glibc-ports-$(GLIBC_VERSION).tar.bz2
# GCC-FINAL
--enable-languages=c,c++ --enable-__cxa_atexit \
--enable-threads=posix --disable-libstdcxx-pch --disable-bootstrap \
--disable-libgomp --disable-libssp --disable-libmudflap \
- --with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) \
+ --with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) && \
make $(MJ) AS_FOR_TARGET="$(TARGET)-as" LD_FOR_TARGET="$(TARGET)-ld" && \
make install || exit 1
cp -va $(WORK)/build-gcc-final/$(TARGET)/libstdc++-v3/src/.libs/libstdc++.so* $(CLFS)/usr/lib
gcc-final: libgmp libmpfr glibc $(CLFS)/lib/gcc
gcc-final-clean:
- rm -vrf $(WORK)/build-gcc-final $(WORK)/gcc-$(GCC_VERSION)
+ rm -rf $(WORK)/build-gcc-final $(WORK)/gcc-$(GCC_VERSION)
gcc-final-distclean: gcc-final-clean
- rm -vf $(WORK)/gcc-$(GCC_VERSION).tar.bz2
+ rm -f $(WORK)/gcc-$(GCC_VERSION).tar.bz2
# SETUP FOR PKGUTILS-CROSS
test: gcc-final $(WORK)/test
test-clean:
- rm -vrf $(WORK)/test
+ rm -rf $(WORK)/test
test-distclean: test-clean