# $NetBSD: Makefile,v 1.3 1998/09/30 16:47:47 jonathan Exp $ # XXX set MACHINE_GNU_ARCH for _.mk .include PROG= ld SRCS= ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c ldmain.c ldmisc.c \ ldver.c ldwrite.c lexsup.c mri.c ldcref.c ldgram.y ldlex.l MAN= ld.1 YHEADER=1 CPPFLAGS+= -I. -I${.CURDIR} -I${BFDOBJ} -I${DIST}/ld \ -I${DIST}/bfd -I${DIST}/include \ -DDEFAULT_EMULATION='"${DEFAULT_EMUL}"' \ -DSCRIPTDIR='"/usr/libdata/ldscripts"' \ -DTARGET='"${MACHINE_GNU_ARCH}--netbsd"' \ -DEMULATION_LIST='${EMULS:S/^/\&ld_/:S/$/_emulation,/} 0' # gets these from BFDOBJ since ld uses bfd internal headers DPADD+= ${BFDOBJ}/libbfd_pic.a LDADD+= -L${BFDOBJ} -lbfd DIST= ${.CURDIR}/../../dist BFDOBJ!= cd ${.CURDIR}/../../lib/bfd; ${MAKE} print-objdir .PATH: ${DIST}/ld .include "_${MACHINE_ARCH}.mk" LIB_PATH= ${LIBDIR} # passed to genscripts.sh .for _EMUL_ in ${EMULS} SRCS+= e${_EMUL_}.c CLEANFILES+= e${_EMUL_}.c e${_EMUL_}.c: ${DIST}/ld/genscripts.sh ${DIST}/ld/emulparams/${_EMUL_}.sh sh ${DIST}/ld/genscripts.sh ${DIST}/ld ${LIBDIR} \ ${MACHINE_GNU_ARCH}-netbsd ${MACHINE_GNU_ARCH}-netbsd \ ${MACHINE_GNU_ARCH}-netbsd ${DEFAULT_EMUL} \ "" ${_EMUL_} .endfor # perhaps these will be installed as well. cleanprog: __cleanldscripts __cleanldscripts: rm -rf ldscripts .include