freebsd-dev/usr.bin/readelf/Makefile
Ed Maste e128bd0ff9 readelf: Add -z decompression support
Compatible with GNU readelf, -z decompresses sections displayed by
-x or -p.

ELF Tool Chain ticket #555
https://sourceforge.net/p/elftoolchain/tickets/555/

Submitted by:	Tiger Gao <tig@FreeBSDFoundation.org>
Reviewed by:	markj
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:    https://reviews.freebsd.org/D26909
2020-10-31 15:27:45 +00:00

37 lines
894 B
Makefile

# $FreeBSD$
.include <src.opts.mk>
ELFTCDIR= ${SRCTOP}/contrib/elftoolchain
READELFDIR= ${ELFTCDIR}/readelf
.PATH: ${READELFDIR}
PROG= readelf
SRCS= readelf.c
LIBADD= dwarf elftc elf z
.if ${MK_CASPER} != "no"
LIBADD+= casper
LIBADD+= cap_fileargs
CFLAGS+= -DWITH_CASPER
.endif
CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
# This same hack is in lib/libelf/Makefile and lib/libdwarf/Makefile
# We need to link against the correct version of these files. One
# solution is to include SRCTOP/sys in the include path. This causes
# problems when a header file in sys depends on a file in another
# part of the tree, e.g. a machine dependent header.
#
SRCS+= sys/elf32.h sys/elf64.h sys/elf_common.h
CLEANDIRS= sys
CFLAGS+= -I.
sys/elf32.h sys/elf64.h sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
mkdir -p ${.OBJDIR}/sys
ln -sf ${.ALLSRC} ${.TARGET}
.include <bsd.prog.mk>