annotate src/native-binutils.mk @ 2915:74304e21f1ab

native gcc and binutils
author John W. Eaton <jwe@octave.org>
date Wed, 12 Dec 2012 09:54:24 -0500
parents
children c90f5757f351
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2915
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 # This file is part of MXE.
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 # See index.html for further information.
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 PKG := native-binutils
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 $(PKG)_IGNORE :=
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 $(PKG)_CHECKSUM := 587fca86f6c85949576f4536a90a3c76ffc1a3e1
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 $(PKG)_SUBDIR := binutils-$($(PKG)_VERSION)
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 $(PKG)_FILE := binutils-$($(PKG)_VERSION).tar.bz2
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 $(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/binutils/$($(PKG)_FILE)
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 $(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/binutils/$($(PKG)_FILE)
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 $(PKG)_DEPS :=
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 define $(PKG)_UPDATE
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 $(WGET) -q -O- 'http://ftp.gnu.org/gnu/binutils/?C=M;O=D' | \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 $(SED) -n 's,.*<a href="binutils-\([0-9][^"]*\)\.tar.*,\1,p' | \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 grep -v '^2\.1' | \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 head -1
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18 endef
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20 define $(PKG)_BUILD
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 # install config.guess for general use
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 $(INSTALL) -d '$(PREFIX)/../dist/usr/bin'
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 $(INSTALL) -m755 '$(1)/config.guess' '$(PREFIX)/../dist/usr/bin/'
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 # install target-specific autotools config file
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 $(INSTALL) -d '$(PREFIX)/../dist/usr/share'
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 echo "ac_cv_build=`$(1)/config.guess`" > '$(PREFIX)/../dist/usr/share/config.site'
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 cd '$(1)' && ./configure \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 --target='$(TARGET)' \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31 --host='$(TARGET)' \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
32 --build="`config.guess`" \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
33 --prefix='/usr' \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
34 --with-gcc \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35 --with-gnu-ld \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36 --with-gnu-as \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 --disable-nls \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 $(ENABLE_SHARED_OR_STATIC) \
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 --disable-werror
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 $(MAKE) -C '$(1)' -j '$(JOBS)'
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41 $(MAKE) -C '$(1)' -j 1 DESTDIR='$(PREFIX)/../native' install
74304e21f1ab native gcc and binutils
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42 endef