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