1 ELF_SCR_EXT= x xbn xn xr xs xu xc xsc
3 .include "../Makefile.inc0"
9 LIBEXEC_BINUTILS= /usr/libexec/binutils217
10 SCRIPTDIR= ${LIBEXEC_BINUTILS}/ldscripts
11 SRCS+= ldcref.c ldctor.c ldemul.c ldemul-list.h ldexp.c ldfile.c \
12 ldgram.c ldlang.c ldlex.c ldmain.c ldmisc.c \
13 ldver.c ldwrite.c lexsup.c mri.c
15 .if defined(BOOTSTRAPPING) && !exists(/usr/include/elf-hints.h)
17 CLEANFILES+= elf-hints.h
20 ${LN} -sf ${.CURDIR}/../../../../include/${.TARGET} .
24 CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
25 CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\"
26 CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd -I${.OBJDIR}/../libbfd
27 CFLAGS+= -DBINDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
28 CFLAGS+= -DTOOLBINDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
30 DPADD= ${RELTOP}/libbfd/libbfd.a
31 DPADD+= ${RELTOP}/libiberty/libiberty.a
33 CLEANDIRS+= ldscripts tmpdir
34 CLEANFILES+= ldemul-list.h stringify.sed
36 # If set, BINUTILSDISTDIR is the path to a directory containing the full GNU
37 # binutils release. FreeBSD only distributes the bits that are required to
38 # build native architectures. BINUTILSDISTDIR is needed to build cross tools.
39 .if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
40 .PATH: ${BINUTILSDISTDIR}/ld
41 CFLAGS+= -I${BINUTILSDISTDIR}/ld
47 EMXFR+= extern ld_emulation_xfer_type ld_${_e}_emulation;
48 EMLST+= &ld_${_e}_emulation,
52 echo "${EMXFR}" > ${.TARGET}
53 echo "#define EMULATION_LIST ${EMLST} 0" >> ${.TARGET}
56 ${LN} -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET}
58 ld217.1: ${SRCDIR}/ld/ld.1
59 cp ${.ALLSRC} ${.TARGET}
64 ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
65 ${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR}
67 .include <bsd.prog.mk>