############################################################################### # # # IPFire.org - A linux based firewall # # Copyright (C) 2007 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### ############################################################################### # Definitions ############################################################################### include Config PKG_NAME = adjust-toolchain VER = LFS THISAPP = $(PKG_NAME)-$(VER) TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) ############################################################################### # Top-level Rules ############################################################################### objects = install : $(TARGET) download : ############################################################################### # Installation Details ############################################################################### $(TARGET) : @$(PREBUILD) ifeq "$(STAGE)" "toolchain" mv -v $(TOOLS_DIR)/bin/{ld,ld-old} mv -v $(TOOLS_DIR)/$$(gcc -dumpmachine)/bin/{ld,ld-old} cp -v $(TOOLS_DIR)/bin/{ld-new,ld} ln -sv $(TOOLS_DIR)/bin/ld $(TOOLS_DIR)/$$(gcc -dumpmachine)/bin/ld gcc -dumpspecs | sed 's@$(LINKER)@$(TOOLS_DIR)&@g' \ > `dirname $$(gcc -print-libgcc-file-name)`/specs GCC_INCLUDEDIR=`dirname $$(gcc -print-libgcc-file-name)`/include && \ find $${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; && \ rm -vf `grep -l "DO NOT EDIT THIS FILE" $${GCC_INCLUDEDIR}/*` && \ unset GCC_INCLUDEDIR endif ifeq "$(STAGE)" "base" mv -v $(TOOLS_DIR)/bin/{ld,ld-old} mv -v $(TOOLS_DIR)/$$(gcc -dumpmachine)/bin/{ld,ld-old} mv -v $(TOOLS_DIR)/bin/{ld-new,ld} ln -sfv $(TOOLS_DIR)/bin/ld $(TOOLS_DIR)/$$(gcc -dumpmachine)/bin/ld gcc -dumpspecs | sed \ -e 's@$(TOOLS_DIR)$(LINKER)@$(LINKER)@g' \ -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ -e '/\*cpp:/{n;s@$$@ -isystem /usr/include@}' > \ `dirname $$(gcc --print-libgcc-file-name)`/specs endif ifeq "$(STAGE)" "uclibc" #$(UCLIBC_TARGET)-gcc -dumpspecs \ # > $$($(UCLIBC_TARGET)-gcc --print-file specs) #sed -e 's/%{shared:-lc}/%{!nointl: -lintl} &/' \ # -i $$($(UCLIBC_TARGET)-gcc --print-file specs) mv -v $(UCLIBC_DIR)/$(UCLIBC_TARGET)/bin/{ld,ld-old} mv -v $(UCLIBC_DIR)/$(UCLIBC_TARGET)/bin/{ld-new,ld} ln -sfv ../$(UCLIBC_TARGET)/bin/ld \ $(UCLIBC_DIR)/bin/$(UCLIBC_TARGET)-ld endif @$(POSTBUILD)