2014-12-01 17:49:42 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
.include <src.opts.mk>
|
|
|
|
|
|
|
|
ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain
|
|
|
|
ELFCOPYDIR= ${ELFTCDIR}/elfcopy
|
|
|
|
|
|
|
|
.PATH: ${ELFCOPYDIR}
|
|
|
|
|
2015-07-29 18:45:38 +00:00
|
|
|
.if ${MK_ELFCOPY_AS_OBJCOPY} != "no"
|
|
|
|
PROG= objcopy
|
|
|
|
objcopy.1: elfcopy.1
|
|
|
|
sed -e 's/\.Dt ELFCOPY 1/.Dt OBJCOPY 1/' \
|
|
|
|
-e 's/\.Nm elfcopy/.Nm objcopy/' < ${.ALLSRC} > ${.TARGET}
|
|
|
|
CLEANFILES+= objcopy.1
|
|
|
|
.else
|
2014-12-01 17:49:42 +00:00
|
|
|
PROG= elfcopy
|
2015-07-29 18:45:38 +00:00
|
|
|
.endif
|
2014-12-01 17:49:42 +00:00
|
|
|
|
|
|
|
SRCS= archive.c ascii.c binary.c main.c sections.c segments.c symbols.c
|
|
|
|
|
|
|
|
WARNS?= 5
|
|
|
|
|
|
|
|
LIBADD= archive elftc elf
|
|
|
|
|
|
|
|
CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
|
|
|
|
|
2015-07-29 18:45:38 +00:00
|
|
|
MAN= ${PROG}.1 strip.1
|
2014-12-01 17:49:42 +00:00
|
|
|
|
2015-07-29 18:45:38 +00:00
|
|
|
LINKS= ${BINDIR}/${PROG} ${BINDIR}/strip
|
2014-12-01 17:49:42 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|