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