1 # $NetBSD: Makefile,v 1.16 2009/10/12 08:00:41 skrll Exp $
7 .if
$(HAVE_BINUTILS
) == "219"
8 GNUHOSTDIST
= ${.CURDIR
}/..
/..
/external
/gpl3
/binutils
/dist
11 --with-pkgversion
="NetBSD Binutils" \
12 --with-bugurl
="http://www.NetBSD.org/support/send-pr.html"
17 CONFIGURE_ARGS
= --target
=${MACHINE_GNU_PLATFORM} --disable-nls \
18 --program-transform-name
="s,^,${MACHINE_GNU_PLATFORM}-," \
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
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 \
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} \
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
)