Makefile revision 126197
1# $FreeBSD: head/gnu/usr.bin/binutils/ld/Makefile 126197 2004-02-24 19:23:33Z johan $ 2 3.include "../Makefile.inc0" 4 5.PATH: ${SRCDIR}/ld 6 7PROG= ld 8SCRIPTDIR= /usr/libdata/ldscripts 9SRCS+= 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 12 13WARNS?= 1 14CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}/usr/libdata\" 15CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\" 16CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd 17NOSHARED?= yes 18DPADD= ${RELTOP}/libbfd/libbfd.a 19DPADD+= ${RELTOP}/libiberty/libiberty.a 20LDADD= ${DPADD} 21CLEANDIRS+= ldscripts 22CLEANFILES+= ldemul-list.h stringify.sed 23 24# If set, BINUTILSDISTDIR is the path to a directory containing the full GNU 25# binutils release. FreeBSD only distributes the bits that are required to 26# build native architectures. BINUTILSDISTDIR is needed to build cross tools. 27.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR}) 28.PATH: ${BINUTILSDISTDIR}/ld 29CFLAGS+= -I${BINUTILSDISTDIR}/ld 30.endif 31 32EMXFR= 33EMLST= 34.for _e in ${EMS} 35EMXFR+= extern ld_emulation_xfer_type ld_${_e}_emulation; 36EMLST+= &ld_${_e}_emulation, 37.endfor 38 39ldemul-list.h: 40 echo "${EMXFR}" > ${.TARGET} 41 echo "#define EMULATION_LIST ${EMLST} 0" >> ${.TARGET} 42 43stringify.sed: 44 ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET} 45 46afterinstall: 47 ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 48 ${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR} 49 50.include <bsd.prog.mk> 51