2003-12-04 12:29:31 +03:00
|
|
|
# $NetBSD: Makefile,v 1.6 2003/12/04 09:29:36 mrg Exp $
|
2003-07-25 20:26:51 +04:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2003-11-27 13:12:02 +03:00
|
|
|
MODULE= binutils
|
2003-07-25 20:26:51 +04:00
|
|
|
|
|
|
|
CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} --disable-nls \
|
|
|
|
--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-,"
|
|
|
|
|
2003-11-27 13:12:02 +03:00
|
|
|
MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
|
2003-07-25 20:26:51 +04:00
|
|
|
|
|
|
|
ALL_TARGET= all-binutils all-gas all-ld
|
|
|
|
INSTALL_TARGET= install-binutils install-gas install-ld
|
|
|
|
|
|
|
|
.include "${.CURDIR}/../Makefile.gnuhost"
|
|
|
|
|
2003-12-01 12:37:09 +03:00
|
|
|
CCADDFLAGS= -I${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
|
2003-07-25 20:26:51 +04:00
|
|
|
|
|
|
|
NEWCONFIGDIR?= ${.CURDIR}/../..
|
2003-11-27 13:12:02 +03:00
|
|
|
MKNATIVE?= ${.CURDIR}/mknative-binutils
|
2003-07-25 20:26:51 +04:00
|
|
|
|
|
|
|
native-binutils: .native/.configure_done
|
|
|
|
@echo 'Extracting GNU binutils configury for a native toolchain.'
|
2003-11-27 13:12:02 +03:00
|
|
|
@MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} binutils \
|
2003-07-25 20:26:51 +04:00
|
|
|
${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
|
|
|
|
|
|
|
|
.native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
|
2003-11-27 13:12:02 +03:00
|
|
|
mkdir .native 2>/dev/null || true
|
|
|
|
PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
|
2003-07-25 20:26:51 +04:00
|
|
|
(cd .native && ${CONFIGURE_ENV:NC*:NLD*} \
|
|
|
|
CC_FOR_BUILD=${HOST_CC:Q} \
|
|
|
|
CC=${CC:Q}' '${CCADDFLAGS:Q} \
|
|
|
|
CXX=${CXX:Q}' '${CCADDFLAGS:Q} \
|
|
|
|
CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
|
|
|
|
CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
|
|
|
|
MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
|
|
|
|
XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
|
|
|
|
LIBS=-lintl \
|
|
|
|
ac_cv_prog_cc_cross=yes \
|
|
|
|
ac_cv_func_strcoll_works=yes \
|
2003-10-26 10:25:33 +03:00
|
|
|
${HOST_SH} ${GNUHOSTDIST}/configure \
|
2003-07-25 20:26:51 +04:00
|
|
|
--build=`${.CURDIR}/../../gnu/dist/toolchain/config.guess` \
|
|
|
|
--host=${MACHINE_GNU_PLATFORM} \
|
|
|
|
--target=${MACHINE_GNU_PLATFORM}) && \
|
2003-11-27 13:12:02 +03:00
|
|
|
(cd .native && ${MAKE} configure-host) && \
|
2003-07-25 20:26:51 +04:00
|
|
|
(cd .native/bfd && ${MAKE} bfd.h) && \
|
|
|
|
(cd .native/ld && ${MAKE} ldemul-list.h) && \
|
2003-11-27 13:12:02 +03:00
|
|
|
(cd .native && \
|
2003-07-25 20:26:51 +04:00
|
|
|
${MAKE} configure-target-libiberty \
|
|
|
|
CC_FOR_TARGET=${CC:Q}' '${CCADDFLAGS:Q} \
|
|
|
|
CXX_FOR_TARGET=${CXX:Q}' '${CCADDFLAGS:Q} \
|
|
|
|
CPP=${CPP:Q}' '-I${DESTDIR}/usr/include) && \
|
|
|
|
(cd .native/${MACHINE_GNU_PLATFORM}/libiberty && \
|
|
|
|
${MAKE} needed-list)
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
clean: clean.native
|
|
|
|
clean.native:
|
|
|
|
-rm -r -f .native
|