Changeset a0bb65af in mainline for uspace/app/binutils/Makefile
- Timestamp:
- 2011-05-20T01:04:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 98e4507
- Parents:
- 10a530cc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/binutils/Makefile
r10a530cc ra0bb65af 30 30 space = $(nullstring) # space 31 31 32 # Symlink to the sources of the ported application. 33 APP_DIR = ./src 32 # Information for obtaining specific binutils redistributable package. 33 # Might be subject to change in the future. 34 REDIST_VERSION = 2.21 35 REDIST_NAME = binutils-$(REDIST_VERSION) 36 REDIST_FILENAME = $(REDIST_NAME).tar.bz2 37 REDIST_SOURCE = ftp://ftp.gnu.org/gnu/binutils/ 34 38 35 # D efault directory for the binutils source tree.39 # Directory for the binutils source tree. 36 40 REDIST_DIR = ./redist 37 41 38 # Absolute path to the binutils source tree. 39 # Can be set externally, defaults to $REDIST_DIR. 40 BINUTILS_ABS_PATH ?= $(subst $(space),\ ,$(PWD))/$(REDIST_DIR) 42 # File to detect the presence of binutils source tree. 43 REDIST_DETECT = $(REDIST_DIR)/configure 41 44 42 45 # $USPACE_PREFIX have to be based on the absolute path, … … 94 97 95 98 # Patch native Makefile.common. 99 # Download and extract binutils. 96 100 # Check presence of gcc compiler. 97 101 # Patch $PATH to intercept toolchain calls. 98 102 # Generate false toolchain. 99 # Create symlink to the binutils directory.100 103 # Patch binutils. 101 104 # Configure binutils for target architecture. 102 105 # Make binutils. 103 106 # Copy binaries. 104 all: $(COMMON_MAKEFILE_PATCHED) all_ 107 all: $(COMMON_MAKEFILE_PATCHED) all_ $(REDIST_FILENAME) $(REDIST_DETECT) 105 108 ifeq ($(COMPILER),$(findstring $(COMPILER),$(SUPPORTED_COMPILERS))) 106 109 OLDPATH = $(PATH) … … 115 118 ./toolchain.sh objcopy $(OBJCOPY) 116 119 ./toolchain.sh strip $(STRIP) 117 ln -s -T $(BINUTILS_ABS_PATH) $(APP_DIR) 118 ./intrusive.sh do $(APP_DIR) 120 ./intrusive.sh do $(REDIST_DIR) 119 121 ORIG_DIR = $(subst $(space),\ ,$(PWD)) 120 cd $( APP_DIR)122 cd $(REDIST_DIR) 121 123 ./configure --target=$(TARGET) $(CONF_FLAGS) 122 124 make $(MAKE_TARGETS) 123 125 cd $(ORIG_DIR) 124 cp $( APP_DIR)/gas/as-new ./as125 cp $( APP_DIR)/ld/ld-new ./ld126 cp $(REDIST_DIR)/gas/as-new ./as 127 cp $(REDIST_DIR)/ld/ld-new ./ld 126 128 PATH = $(OLDPATH) 127 129 export PATH … … 134 136 awk -f $^ > $@ 135 137 138 # Download binutils redistributable package. 139 $(REDIST_FILENAME): 140 wget -c $(REDIST_SOURCE)$(REDIST_FILENAME) 141 142 # Extract binutils source tree. 143 $(REDIST_DETECT): $(REDIST_FILENAME) 144 tar -x -j -f $< 145 mv -f $(REDIST_NAME) $(REDIST_DIR) 146 136 147 # Delete binaries. 137 148 # Clean binutils. 138 149 # Unpatch binutils. 139 # Delete symlink140 150 # Delete generated scripts. 141 151 clean: 142 152 rm -f as ld 143 153 ORIG_DIR = $(subst $(space),\ ,$(PWD)) 144 cd $( APP_DIR)154 cd $(REDIST_DIR) 145 155 make distclean 146 156 cd $(ORIG_DIR) 147 ./intrusive.sh undo $(APP_DIR) 148 rm -f $(APP_DIR) 157 ./intrusive.sh undo $(REDIST_DIR) 149 158 rm -f gcc as ar ranlib ld objdump objcopy strip 150 159 rm -f $(COMMON_MAKEFILE_PATCHED)
Note:
See TracChangeset
for help on using the changeset viewer.