1 ELF_SCR_EXT
= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw
3 .
include "../Makefile.inc0"
4 .
include "../Makefile.inc1"
9 MFILE
= ld${MANPAGEVER}.1
11 LIBEXEC_BINUTILS
= ${BINDIR}/..
12 SCRIPTDIR
= ${LIBEXEC_BINUTILS}/ldscripts
32 CFLAGS
+= -DSCRIPTDIR
=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
33 CFLAGS
+= -I
${SRCDIR}/ld -I
${SRCDIR}/bfd
-I
${.OBJDIR
}/..
/libbfd
34 CFLAGS
+= -DBINDIR
=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
35 CFLAGS
+= -DTOOLBINDIR
=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\"
36 CFLAGS
+= -DENABLE_PLUGINS
-DHAVE_CONFIG_H
37 CFLAGS
+= -DTARGET_SYSTEM_ROOT
=\"${USRDATA_PREFIX}\"
38 # link-time optimization requires dlopen() which means ld cannot be built
39 # statically and also support -plugin, not even for cross-tools.
42 CLEANDIRS
+= ldscripts tmpdir
43 CLEANFILES
+= ldemul-list.h stringify.sed
48 EMXFR
+= extern ld_emulation_xfer_type ld_
${_e}_emulation
;
49 EMLST
+= &ld_
${_e}_emulation
,
53 echo
"${EMXFR}" > ${.TARGET
}
54 echo
"#define EMULATION_LIST ${EMLST} 0" >> ${.TARGET
}
57 ${LN} -sf
${SRCDIR}/ld/emultempl
/astring.sed
${.TARGET
}
59 ${MFILE}: ${SRCDIR}/ld/ld.1
60 cp
${.ALLSRC
} ${.TARGET
}
64 .if defined
(IS_PRIMARY
)
65 MLINKS
+= ${MFILE} ld.1
68 afterinstall
: install-ldscripts
70 install-ldscripts
: ${LDSCRIPTS
:S|^|ldscripts
/|
}
71 ${INSTALL} -o
${LIBOWN} -g
${LIBGRP} -m
${LIBMODE} \
72 ${.ALLSRC
} ${DESTDIR}${SCRIPTDIR}
74 .
include <bsd.prog.mk
>