mkfs: move directory entry manipulation
[minix.git] / tools / binutils / Makefile
blob3b204b566ac988f894422bf4c581426a51d8a864
1 # $NetBSD: Makefile,v 1.22 2012/04/15 08:37:32 mrg Exp $
3 .include <bsd.own.mk>
5 MODULE= binutils
7 GNUHOSTDIST= ${.CURDIR}/../../external/gpl3/binutils/dist
9 BRANDING?= \
10 --with-pkgversion="NetBSD Binutils nb1" \
11 --with-bugurl="http://www.NetBSD.org/support/send-pr.html" \
12 --with-lib-path="=/usr/lib" --with-sysroot
14 CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} --disable-nls \
15 --program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
16 --disable-werror \
17 --target=i386-elf-minix \
18 ${BRANDING}
20 MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
22 ALL_TARGET= all-binutils all-gas all-ld
23 INSTALL_TARGET= install-binutils install-gas install-ld
24 .if ${MKCROSSGPROF:Uno} != "no"
25 ALL_TARGET+= all-gprof
26 INSTALL_TARGET+=install-gprof
27 .endif
29 .include "${.CURDIR}/../Makefile.gnuhost"
31 CCADDFLAGS= -I${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
33 # Force avoiding possibly non-executable install-sh.
34 CONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d"
36 NEWCONFIGDIR?= ${.CURDIR}/../..
37 MKNATIVE?= ${.CURDIR}/mknative-binutils
39 native-binutils: .native/.configure_done
40 @echo 'Extracting GNU binutils configury for a native toolchain.'
41 MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} binutils \
42 ${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
44 .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
45 mkdir .native 2>/dev/null || true
46 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
47 (cd .native && ${CONFIGURE_ENV:NC*:NLD*} \
48 CC_FOR_BUILD=${HOST_CC:Q} \
49 CC=${CC:Q}' '${CCADDFLAGS:Q} \
50 CXX=${CXX:Q}' '${CCADDFLAGS:Q} \
51 CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
52 CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
53 MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
54 XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
55 LIBS=-lintl \
56 ac_cv_prog_cc_cross=yes \
57 ac_cv_func_strcoll_works=yes \
58 ${HOST_SH} ${GNUHOSTDIST}/configure \
59 --build=`${GNUHOSTDIST}/config.guess` \
60 --host=${MACHINE_GNU_PLATFORM} \
61 --target=${MACHINE_GNU_PLATFORM} \
62 ${BRANDING} \
64 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
65 (cd .native && ${MAKE} configure-host)
66 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
67 (cd .native/bfd && ${MAKE} bfd.h bfdver.h)
68 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
69 (cd .native/ld && ${MAKE} ldemul-list.h)
70 @touch $@
72 clean: clean.native
73 clean.native:
74 -rm -r -f .native