Revert "binutils 2.22: Promote to primary binutils"
[dragonfly.git] / gnu / usr.bin / binutils221 / ld / Makefile
CommitLineData
03a34518
SW
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
7PROG= ld.bfd
8MAN= ld221.1
1c05bfaa 9MLINKS+=ld221.1 ld.1
03a34518
SW
10LIBEXEC_BINUTILS= ${BINDIR}/..
11SCRIPTDIR= ${LIBEXEC_BINUTILS}/ldscripts
12SRCS+= ldgram.y \
13 ldlex.l \
14 lexsup.c \
15 ldlang.c \
16 mri.c \
17 ldctor.c \
18 ldmain.c \
19 ldwrite.c \
20 ldexp.c \
21 ldemul.c \
22 ldver.c \
23 ldmisc.c \
24 ldfile.c \
25 ldcref.c
26
27SRCS+= ldemul-list.h
28
29WARNS= 1
30CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
31CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd -I${.OBJDIR}/../libbfd
32CFLAGS+= -DBINDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
33CFLAGS+= -DTOOLBINDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
34NOSHARED?= yes
35
36CLEANDIRS+= ldscripts tmpdir
37CLEANFILES+= ldemul-list.h stringify.sed
38
03a34518 39LINKS= ${BINDIR}/ld.bfd ${BINDIR}/ld
03a34518
SW
40
41EMXFR=
42EMLST=
43.for _e in ${EMS}
44EMXFR+= extern ld_emulation_xfer_type ld_${_e}_emulation;
45EMLST+= &ld_${_e}_emulation,
46.endfor
47
48ldemul-list.h:
49 echo "${EMXFR}" > ${.TARGET}
50 echo "#define EMULATION_LIST ${EMLST} 0" >> ${.TARGET}
51
52stringify.sed:
53 ${LN} -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET}
54
55ld221.1: ${SRCDIR}/ld/ld.1
56 cp ${.ALLSRC} ${.TARGET}
57
58CLEANFILES+= ld221.1
59
60afterinstall: install-ldscripts
61
62install-ldscripts: ${LDSCRIPTS:S|^|ldscripts/|}
63 ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
64 ${.ALLSRC} ${DESTDIR}${SCRIPTDIR}
65
66.include <bsd.prog.mk>