Makefile revision 1.37
11.37Schristos# $NetBSD: Makefile,v 1.37 2023/01/18 12:52:55 christos Exp $ 21.1Smrg 31.28Schristos.include <bsd.hostinit.mk> 41.1Smrg 51.4SmrgMODULE= binutils 61.1Smrg 71.25SchristosGNUHOSTDIST= ${.CURDIR}/../../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/dist 81.13Sskrll 91.14SskrllBRANDING?= \ 101.18Sskrll --with-pkgversion="NetBSD Binutils nb1" \ 111.19Sjoerg --with-bugurl="http://www.NetBSD.org/support/send-pr.html" \ 121.19Sjoerg --with-lib-path="=/usr/lib" --with-sysroot 131.14Sskrll 141.37SchristosBASE_CONFIGURE_ARGS= \ 151.37Schristos --target=${MACHINE_GNU_PLATFORM} \ 161.37Schristos --enable-initfini-array=yes \ 171.37Schristos --enable-default-execstack=no \ 181.37Schristos ${BRANDING} 191.37Schristos 201.37SchristosCONFIGURE_ARGS= --disable-nls --disable-werror \ 211.14Sskrll --program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \ 221.37Schristos ${BASE_CONFIGURE_ARGS} 231.1Smrg 241.4SmrgMAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} 251.1Smrg 261.1SmrgALL_TARGET= all-binutils all-gas all-ld 271.1SmrgINSTALL_TARGET= install-binutils install-gas install-ld 281.11Ssimonb.if ${MKCROSSGPROF:Uno} != "no" 291.11SsimonbALL_TARGET+= all-gprof 301.11SsimonbINSTALL_TARGET+=install-gprof 311.11Ssimonb.endif 321.1Smrg 331.1Smrg.include "${.CURDIR}/../Makefile.gnuhost" 341.1Smrg 351.31SchristosCCADDFLAGS= -I${GNUHOSTDIST}/include -I${DESTDIR}/usr/include 361.31SchristosCCADDFLAGS+= -B${DESTDIR}/usr/lib/ 371.33SchristosCCADDFLAGS+= ${HOST_CPPFLAGS} 381.26SmrgLDADDFLAGS= -L${DESTDIR}/lib -L${DESTDIR}/usr/lib 391.1Smrg 401.22Smrg# Force avoiding possibly non-executable install-sh. 411.22SmrgCONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d" 421.22Smrg 431.1SmrgNEWCONFIGDIR?= ${.CURDIR}/../.. 441.4SmrgMKNATIVE?= ${.CURDIR}/mknative-binutils 451.1Smrg 461.1Smrgnative-binutils: .native/.configure_done 471.1Smrg @echo 'Extracting GNU binutils configury for a native toolchain.' 481.7Smrg MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} binutils \ 491.1Smrg ${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM} 501.1Smrg 511.1Smrg.native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile 521.4Smrg mkdir .native 2>/dev/null || true 531.4Smrg PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ 541.1Smrg (cd .native && ${CONFIGURE_ENV:NC*:NLD*} \ 551.1Smrg CC_FOR_BUILD=${HOST_CC:Q} \ 561.1Smrg CC=${CC:Q}' '${CCADDFLAGS:Q} \ 571.1Smrg CXX=${CXX:Q}' '${CCADDFLAGS:Q} \ 581.1Smrg CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \ 591.26Smrg CFLAGS= CPPFLAGS= CXXFLAGS= \ 601.26Smrg LDFLAGS=${LDADDFLAGS:Q} \ 611.1Smrg MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \ 621.1Smrg XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \ 631.1Smrg LIBS=-lintl \ 641.1Smrg ac_cv_prog_cc_cross=yes \ 651.1Smrg ac_cv_func_strcoll_works=yes \ 661.3Slukem ${HOST_SH} ${GNUHOSTDIST}/configure \ 671.7Smrg --build=`${GNUHOSTDIST}/config.guess` \ 681.1Smrg --host=${MACHINE_GNU_PLATFORM} \ 691.37Schristos ${BASE_CONFIGURE_ARGS} \ 701.14Sskrll ) 711.12Suebayasi PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ 721.12Suebayasi (cd .native && ${MAKE} configure-host) 731.12Suebayasi PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ 741.12Suebayasi (cd .native/bfd && ${MAKE} bfd.h bfdver.h) 751.12Suebayasi PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ 761.10Sskrll (cd .native/ld && ${MAKE} ldemul-list.h) 771.1Smrg @touch $@ 781.1Smrg 791.1Smrgclean: clean.native 801.1Smrgclean.native: 811.1Smrg -rm -r -f .native 82