1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1998-03-12 02:55:43 +00:00
|
|
|
|
|
|
|
.include "../Makefile.inc0"
|
|
|
|
|
|
|
|
.PATH: ${SRCDIR}/ld
|
|
|
|
|
|
|
|
PROG= ld
|
|
|
|
SCRIPTDIR= /usr/libdata/ldscripts
|
1998-06-04 06:26:23 +00:00
|
|
|
SRCS+= ldcref.c ldctor.c ldemul.c ldemul-list.h ldexp.c ldfile.c \
|
1998-05-04 16:31:41 +00:00
|
|
|
ldgram.y ldlang.c ldlex.l ldmain.c ldmisc.c \
|
1998-03-12 02:55:43 +00:00
|
|
|
ldver.c ldwrite.c lexsup.c mri.c
|
|
|
|
CFLAGS+= -DSCRIPTDIR=\"${DESTDIR}/usr/libdata\"
|
|
|
|
CFLAGS+= -I${SRCDIR}/ld
|
2000-05-22 08:09:42 +00:00
|
|
|
CFLAGS+= -DVERSION=\"${VERSION}\" -DBFD_VERSION=\"${VERSION}\"
|
2000-03-27 18:02:04 +00:00
|
|
|
DPADD= ${RELTOP}/libbfd/libbfd.a
|
1998-06-03 18:01:04 +00:00
|
|
|
DPADD+= ${RELTOP}/libiberty/libiberty.a
|
2000-03-27 18:02:04 +00:00
|
|
|
LDADD= ${DPADD}
|
1998-03-12 02:55:43 +00:00
|
|
|
CLEANDIRS+= ldscripts
|
2000-05-22 08:09:42 +00:00
|
|
|
CLEANFILES+= ldemul-list.h stringify.sed
|
1998-05-04 21:38:46 +00:00
|
|
|
|
1999-11-06 22:36:40 +00:00
|
|
|
# If set, BINUTILSDISTDIR is the path to a directory containing the full GNU
|
|
|
|
# binutils release. FreeBSD only distributes the bits that are required to
|
|
|
|
# build native architectures. BINUTILSDISTDIR is needed to build cross tools.
|
|
|
|
.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
|
|
|
|
.PATH: ${BINUTILSDISTDIR}/ld
|
|
|
|
CFLAGS+= -I${BINUTILSDISTDIR}/ld
|
|
|
|
.endif
|
|
|
|
|
1998-05-04 21:38:46 +00:00
|
|
|
EMXFR=
|
|
|
|
EMLST=
|
|
|
|
.for _e in ${EMS}
|
|
|
|
EMXFR+= extern ld_emulation_xfer_type ${_e};
|
|
|
|
EMLST+= &${_e},
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
ldemul-list.h:
|
|
|
|
echo "${EMXFR}" > ldemul-list.h
|
|
|
|
echo "#define EMULATION_LIST ${EMLST} 0" >> ldemul-list.h
|
|
|
|
|
2000-05-22 08:09:42 +00:00
|
|
|
stringify.sed:
|
|
|
|
ln -sf ${SRCDIR}/ld/emultempl/stringify.sed ${.TARGET}
|
|
|
|
|
1998-03-12 02:55:43 +00:00
|
|
|
afterinstall:
|
|
|
|
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
|
|
|
${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR}
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|