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