5 ELFTCDIR= ${SRCTOP}/contrib/elftoolchain
6 ELFCOPYDIR= ${ELFTCDIR}/elfcopy
10 .if ${MK_ELFCOPY_AS_OBJCOPY} != "no"
13 sed -e 's/\.Dt ELFCOPY 1/.Dt OBJCOPY 1/' \
14 -e 's/\.Nm elfcopy/.Nm objcopy/' < ${.ALLSRC} > ${.TARGET}
15 CLEANFILES+= objcopy.1
20 SRCS= archive.c ascii.c binary.c main.c pe.c sections.c segments.c symbols.c
24 LIBADD= archive elftc elf pe
26 CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/libpe -I${ELFTCDIR}/common
29 MAN= ${PROG}.1 strip.1
31 LINKS= ${BINDIR}/${PROG} ${BINDIR}/strip
33 # This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
34 # We need to link against the correct version of these files. One
35 # solution is to include SRCTOP/sys in the include path. This causes
36 # problems when a header file in sys depends on a file in another
37 # part of the tree, e.g. a machine dependent header.
39 SRCS+= sys/elf_common.h
42 sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
43 mkdir -p ${.OBJDIR}/sys
44 ln -sf ${.ALLSRC} ${.TARGET}
46 .include <bsd.prog.mk>