1 # $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile,v 1.8.2.8 2002/09/01 23:39:14 obrien Exp $
3 .include "../Makefile.inc0"
8 SCRIPTDIR= /usr/libdata/ldscripts
9 SRCS+= ldcref.c ldctor.c ldemul.c ldemul-list.h ldexp.c ldfile.c \
10 ldgram.y ldlang.c ldlex.l ldmain.c ldmisc.c \
11 ldver.c ldwrite.c lexsup.c mri.c
13 .if defined(BOOTSTRAPPING) && !exists(/usr/include/elf-hints.h)
15 CLEANFILES+= elf-hints.h
18 ln -sf ${.CURDIR}/../../../../include/${.TARGET} .
22 CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}/usr/libdata\"
23 CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\"
24 CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd
26 DPADD= ${RELTOP}/libbfd/libbfd.a
27 DPADD+= ${RELTOP}/libiberty/libiberty.a
30 CLEANFILES+= ldemul-list.h stringify.sed
32 # If set, BINUTILSDISTDIR is the path to a directory containing the full GNU
33 # binutils release. FreeBSD only distributes the bits that are required to
34 # build native architectures. BINUTILSDISTDIR is needed to build cross tools.
35 .if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
36 .PATH: ${BINUTILSDISTDIR}/ld
37 CFLAGS+= -I${BINUTILSDISTDIR}/ld
43 EMXFR+= extern ld_emulation_xfer_type ld_${_e}_emulation;
44 EMLST+= &ld_${_e}_emulation,
48 echo "${EMXFR}" > ${.TARGET}
49 echo "#define EMULATION_LIST ${EMLST} 0" >> ${.TARGET}
52 ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET}
55 ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
56 ${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR}
58 .include <bsd.prog.mk>