NetBSD/tools/binutils/Makefile
skrll c88f165c85 Revert previous.
We need to fix vax a different way as the move of -B${DESTDIR}/usr/lib/
to CFLAGS filters into the defs.mk files.
2005-01-14 07:46:56 +00:00

60 lines
2.0 KiB
Makefile

# $NetBSD: Makefile,v 1.9 2005/01/14 07:46:56 skrll Exp $
.include <bsd.own.mk>
MODULE= binutils
CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} --disable-nls \
--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-,"
MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
ALL_TARGET= all-binutils all-gas all-ld
INSTALL_TARGET= install-binutils install-gas install-ld
.include "${.CURDIR}/../Makefile.gnuhost"
CCADDFLAGS= -I${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
NEWCONFIGDIR?= ${.CURDIR}/../..
MKNATIVE?= ${.CURDIR}/mknative-binutils
native-binutils: .native/.configure_done
@echo 'Extracting GNU binutils configury for a native toolchain.'
MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} binutils \
${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
.native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
mkdir .native 2>/dev/null || true
PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
(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 \
${HOST_SH} ${GNUHOSTDIST}/configure \
--build=`${GNUHOSTDIST}/config.guess` \
--host=${MACHINE_GNU_PLATFORM} \
--target=${MACHINE_GNU_PLATFORM}) && \
(cd .native && ${MAKE} configure-host) && \
(cd .native/bfd && ${MAKE} bfd.h) && \
(cd .native/ld && ${MAKE} ldemul-list.h) && \
(cd .native && \
${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