freebsd-skq/contrib/elftoolchain/elfcopy/Makefile
emaste a6ae90983e Update ELF Tool Chain to upstream rev 3400
Some notable improvements include:

readelf:
- Add AArch64 relocation definitions.
- Report value of unknown relocation types.

elfcopy:
- Consider symbols with STB_GNU_UNIQUE binding as global symbols.
- Fixed support for VMA adjustment for loadable sections found
  in relocatable objects.
- Handle nameless global symbols.
- Improve wildcard matching for !-prefixed symbols.
- Add PE/COFF support.

elfdump:
- Improve section type reporting.
- Add MIPS-specific section types.

This update also includes a significant number of bug fixes.

PR:		207091 [exp-run]
Sponsored by:	The FreeBSD Foundation
2016-02-12 20:54:02 +00:00

55 lines
963 B
Makefile

# $Id: Makefile 3381 2016-01-30 19:39:47Z jkoshy $
TOP= ..
.include "${TOP}/mk/elftoolchain.components.mk"
PROG= elfcopy
SRCS= archive.c ascii.c binary.c main.c sections.c segments.c \
symbols.c
WARNS?= 5
DPADD= ${LIBELF} ${LIBELFTC}
LDADD= -lelf -lelftc
.if !defined(LIBELF_AR)
LDADD+= -larchive
.endif
.if defined(WITH_PE) && ${WITH_PE:tl} == "yes"
SRCS+= pe.c
CFLAGS+= -DWITH_PE=1
DPADD+= ${LIBPE}
LDADD+= -lpe
.endif
MAN= elfcopy.1 mcs.1 strip.1
MLINKS= elfcopy.1 objcopy.1
NO_SHARED?= yes
LINKS= ${BINDIR}/elfcopy ${BINDIR}/mcs \
${BINDIR}/elfcopy ${BINDIR}/objcopy \
${BINDIR}/elfcopy ${BINDIR}/strip
EXTRA_TARGETS= mcs strip objcopy
CLEANFILES+= ${EXTRA_TARGETS}
# Create in-place symbolic links to "elfcopy" at build time.
all: ${EXTRA_TARGETS}
${EXTRA_TARGETS}: ${PROG}
ln -s ${PROG} ${.TARGET}
.include "${TOP}/mk/elftoolchain.prog.mk"
.if ${OS_HOST} == "OpenBSD"
CFLAGS+= -I/usr/local/include
LDFLAGS+= -L/usr/local/lib
.endif