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