51 lines
1.3 KiB
Makefile
Raw Normal View History

1999-08-27 23:37:10 +00:00
# $FreeBSD$
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/ld
2001-10-14 01:57:19 +00:00
PROG= ld
SCRIPTDIR= /usr/libdata/ldscripts
SRCS+= ldcref.c ldctor.c ldemul.c ldemul-list.h ldexp.c ldfile.c \
ldgram.y ldlang.c ldlex.l ldmain.c ldmisc.c \
ldver.c ldwrite.c lexsup.c mri.c
WARNS= 1
CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}/usr/libdata\"
CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\"
2001-10-14 01:58:18 +00:00
CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd
2001-10-14 01:57:19 +00:00
NOSHARED?= yes
DPADD= ${RELTOP}/libbfd/libbfd.a
DPADD+= ${RELTOP}/libiberty/libiberty.a
2001-10-14 01:57:19 +00:00
LDADD= ${DPADD}
CLEANDIRS+= ldscripts
CLEANFILES+= ldemul-list.h stringify.sed
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.
2001-10-14 01:57:19 +00:00
.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
.PATH: ${BINUTILSDISTDIR}/ld
CFLAGS+= -I${BINUTILSDISTDIR}/ld
1999-11-06 22:36:40 +00:00
.endif
EMXFR=
EMLST=
.for _e in ${EMS}
EMXFR+= extern ld_emulation_xfer_type ld_${_e}_emulation;
EMLST+= &ld_${_e}_emulation,
.endfor
ldemul-list.h:
2001-10-14 01:57:19 +00:00
echo "${EMXFR}" > ${.TARGET}
echo "#define EMULATION_LIST ${EMLST} 0" >> ${.TARGET}
stringify.sed:
ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET}
afterinstall:
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR}
.include <bsd.prog.mk>