No empty .Rs/.Re
[netbsd-mini2440.git] / tools / binutils / Makefile
blob9f8ad85c9fba390c557dda39235fd068596121ff
1 # $NetBSD: Makefile,v 1.16 2009/10/12 08:00:41 skrll Exp $
3 .include <bsd.own.mk>
5 MODULE= binutils
7 .if $(HAVE_BINUTILS) == "219"
8 GNUHOSTDIST= ${.CURDIR}/../../external/gpl3/binutils/dist
10 BRANDING?= \
11 --with-pkgversion="NetBSD Binutils" \
12 --with-bugurl="http://www.NetBSD.org/support/send-pr.html"
13 .else
14 BRANDING?=
15 .endif
17 CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} --disable-nls \
18 --program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
19 ${BRANDING}
21 MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
23 ALL_TARGET= all-binutils all-gas all-ld
24 INSTALL_TARGET= install-binutils install-gas install-ld
25 .if ${MKCROSSGPROF:Uno} != "no"
26 ALL_TARGET+= all-gprof
27 INSTALL_TARGET+=install-gprof
28 .endif
30 .include "${.CURDIR}/../Makefile.gnuhost"
32 CCADDFLAGS= -I${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
34 NEWCONFIGDIR?= ${.CURDIR}/../..
35 MKNATIVE?= ${.CURDIR}/mknative-binutils
37 native-binutils: .native/.configure_done
38 @echo 'Extracting GNU binutils configury for a native toolchain.'
39 MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} binutils \
40 ${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
42 .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
43 mkdir .native 2>/dev/null || true
44 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
45 (cd .native && ${CONFIGURE_ENV:NC*:NLD*} \
46 CC_FOR_BUILD=${HOST_CC:Q} \
47 CC=${CC:Q}' '${CCADDFLAGS:Q} \
48 CXX=${CXX:Q}' '${CCADDFLAGS:Q} \
49 CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
50 CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
51 MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
52 XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
53 LIBS=-lintl \
54 ac_cv_prog_cc_cross=yes \
55 ac_cv_func_strcoll_works=yes \
56 ${HOST_SH} ${GNUHOSTDIST}/configure \
57 --build=`${GNUHOSTDIST}/config.guess` \
58 --host=${MACHINE_GNU_PLATFORM} \
59 --target=${MACHINE_GNU_PLATFORM} \
60 ${BRANDING} \
62 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
63 (cd .native && ${MAKE} configure-host)
64 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
65 (cd .native/bfd && ${MAKE} bfd.h bfdver.h)
66 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
67 (cd .native/ld && ${MAKE} ldemul-list.h)
68 @touch $@
70 clean: clean.native
71 clean.native:
72 -rm -r -f .native