binutils 2.20: Upgrade to version 2.20.1
[dragonfly.git] / gnu / usr.bin / binutils220 / ld / Makefile
CommitLineData
2ef93bd8
SS
1ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw
2
3.include "../Makefile.inc0"
4
5.PATH: ${SRCDIR}/ld
6
182ccc58 7PROG= ld.bfd
53bd31cd 8MAN= ld220.1
182ccc58 9#MLINKS+=ld220.1 ld.1
2ef93bd8
SS
10LIBEXEC_BINUTILS= ${BINDIR}/..
11SCRIPTDIR= ${LIBEXEC_BINUTILS}/ldscripts
12SRCS+= ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
13 ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
14
15SRCS+= ldemul-list.h
16
17WARNS= 1
18CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
19CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd -I${.OBJDIR}/../libbfd
20CFLAGS+= -DBINDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
21CFLAGS+= -DTOOLBINDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
22NOSHARED?= yes
23
24CLEANDIRS+= ldscripts tmpdir
25CLEANFILES+= ldemul-list.h stringify.sed
26
182ccc58
JM
27LINKS= ${BINDIR}/ld.bfd ${BINDIR}/ld
28
2ef93bd8
SS
29EMXFR=
30EMLST=
31.for _e in ${EMS}
32EMXFR+= extern ld_emulation_xfer_type ld_${_e}_emulation;
33EMLST+= &ld_${_e}_emulation,
34.endfor
35
36ldemul-list.h:
37 echo "${EMXFR}" > ${.TARGET}
38 echo "#define EMULATION_LIST ${EMLST} 0" >> ${.TARGET}
39
40stringify.sed:
41 ${LN} -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET}
42
53bd31cd
SW
43ld220.1: ${SRCDIR}/ld/ld.1
44 cp ${.ALLSRC} ${.TARGET}
45
46CLEANFILES+= ld220.1
47
2ef93bd8
SS
48afterinstall: install-ldscripts
49
50install-ldscripts: ${LDSCRIPTS:S|^|ldscripts/|}
51 ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
52 ${.ALLSRC} ${DESTDIR}${SCRIPTDIR}
53
54.include <bsd.prog.mk>