Changeset 2431f30 in mainline for uspace/app/binutils/Makefile
- Timestamp:
- 2011-06-13T01:32:54Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c1198c2
- Parents:
- df56f5c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/binutils/Makefile
rdf56f5c r2431f30 46 46 # because targets derived from it will be referenced from 47 47 # other than the current directory. 48 USPACE_PREFIX = $(subst $(space),\ ,$( PWD))/../..48 USPACE_PREFIX = $(subst $(space),\ ,$(shell pwd))/../.. 49 49 50 50 # Ensure static configuration of Makefile.common. … … 70 70 71 71 # Patch $PATH to intercept toolchain calls. 72 PATH := $(PWD):$(PATH) 72 PATH := $(shell pwd):$(PATH) 73 export PATH 73 74 74 75 # Shell script for false toolchain generation. … … 89 90 # Map the HelenOS target to binutils target. 90 91 ifeq ($(PLATFORM),amd64) 91 TARGET=amd64-linux-gnu 92 else ($(PLATFORM),arm32) 93 TARGET=arm-linux-gnu 94 else ($(PLATFORM),ia32) 95 TARGET=i686-pc-linux-gnu 96 else ($(PLATFORM),ia64) 97 TARGET=ia64-pc-linux-gnu 98 else ($(PLATFORM),mips32) 99 TARGET=mipsel-linux-gnu 100 else ($(PLATFORM),mips32eb) 101 TARGET=mips-linux-gnu 102 else ($(PLATFORM),mips64) 103 TARGET=mips64el-linux-gnu 104 else ($(PLATFORM),ppc32) 105 TARGET=ppc-linux-gnu 106 else ($(PLATFORM),ppc64) 107 TARGET=ppc64-linux-gnu 108 else ($(PLATFORM),sparc64) 109 TARGET=sparc64-linux-gnu 92 TARGET = amd64-linux-gnu 93 endif 94 ifeq ($(PLATFORM),arm32) 95 TARGET = arm-linux-gnu 96 endif 97 ifeq ($(PLATFORM),ia32) 98 TARGET = i686-pc-linux-gnu 99 endif 100 ifeq ($(PLATFORM),ia64) 101 TARGET = ia64-pc-linux-gnu 102 endif 103 ifeq ($(PLATFORM),mips32) 104 TARGET = mipsel-linux-gnu 105 endif 106 ifeq ($(PLATFORM),mips32eb) 107 TARGET = mips-linux-gnu 108 endif 109 ifeq ($(PLATFORM),mips64) 110 TARGET = mips64el-linux-gnu 111 endif 112 ifeq ($(PLATFORM),ppc32) 113 TARGET = ppc-linux-gnu 114 endif 115 ifeq ($(PLATFORM),ppc64) 116 TARGET = ppc64-linux-gnu 117 endif 118 ifeq ($(PLATFORM),sparc64) 119 TARGET = sparc64-linux-gnu 110 120 endif 111 121 112 122 # Binutils configure flags. 113 123 CONF_FLAGS = --disable-nls --disable-shared --enable-static \ 114 --with-zlib=no 124 --with-zlib=no --with-ppl=no --with-cloog=no \ 125 --with-gmp=no --with-mpfr=no --with-mpc=no 115 126 116 127 # Binutils make targets. … … 123 134 all: $(COMMON_MAKEFILE_PATCHED) all_ $(TOOLCHAIN) $(BINUTILS_PATCHED) \ 124 135 $(BINUTILS_CONFIGURED) $(REDIST_DETECT) 125 export PATH126 136 make -C $(REDIST_DIR) $(MAKE_TARGETS) 127 137 cp -f $(REDIST_DIR)/gas/as-new ./as … … 143 153 $(REDIST_DETECT): $(REDIST_FILENAME) 144 154 tar -x -j -f $< 145 mv -f $(REDIST_NAME) $(REDIST_DIR) 155 mv -f -T $(REDIST_NAME) $(REDIST_DIR) 156 touch $@ 146 157 147 158 # Generate false toolchain scripts. 148 159 $(TOOLCHAIN): $(TOOLCHAIN_SCRIPT) 149 $^gcc $(CC) '$(CFLAGS)'150 $^as $(AS)151 $^ar $(AR)152 $^ranlib153 $^ld $(LD) '$(LFLAGS)' '$(LINKER_SCRIPT)' '$(LIBS) $(BASE_LIBS)'154 $^objdump $(OBJDUMP)155 $^objcopy $(OBJCOPY)156 $^strip $(STRIP)160 ./$< gcc $(CC) '$(CFLAGS)' 161 ./$< as $(AS) 162 ./$< ar $(AR) 163 ./$< ranlib 164 ./$< ld $(LD) '$(LFLAGS)' '$(LINKER_SCRIPT)' '$(LIBS) $(BASE_LIBS)' 165 ./$< objdump $(OBJDUMP) 166 ./$< objcopy $(OBJCOPY) 167 ./$< strip $(STRIP) 157 168 158 169 # Patch binutils source tree. 159 170 $(BINUTILS_PATCHED): $(BINUTILS_PATCH) $(REDIST_DETECT) 160 $^do $(REDIST_DIR)171 ./$< do $(REDIST_DIR) 161 172 touch $@ 162 173 163 174 # Configure binutils. 175 # $LD variable have to exported to override configure script caching. 164 176 $(BINUTILS_CONFIGURED): $(REDIST_DIR)/configure $(REDIST_DETECT) 165 $^ --target=$(TARGET) $(CONF_FLAGS) 177 export LD=ld; \ 178 cd $(REDIST_DIR); \ 179 ./configure --target=$(TARGET) $(CONF_FLAGS) 166 180 167 181 # Delete binaries. … … 169 183 # Unpatch binutils. 170 184 # Delete generated scripts. 171 clean: $(BINUTILS_PATCH) 185 clean: $(BINUTILS_PATCH) clean_ 172 186 rm -f as ld 173 if [ -e $(REDIST_DIR)/Makefile ]; then 174 make -C $(REDIST_DIR) distclean 187 if [ -e $(REDIST_DIR)/Makefile ]; then \ 188 make -C $(REDIST_DIR) distclean; \ 175 189 fi 176 if [ -e $(BINUTILS_PATCHED) ]; then 177 ./intrusive.sh undo $(REDIST_DIR) 178 rm -f $(BINUTILS_PATCHED) 190 if [ -e $(BINUTILS_PATCHED) ]; then \ 191 ./intrusive.sh undo $(REDIST_DIR); \ 192 rm -f $(BINUTILS_PATCHED); \ 179 193 fi 180 194 rm -f $(TOOLCHAIN)
Note:
See TracChangeset
for help on using the changeset viewer.