aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/readelf/Makefile
blob: f865a97e92f5e0058576a9ab10aab3d9c774cdd7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# $FreeBSD$

ELFTCDIR=	${.CURDIR}/../../contrib/elftoolchain
READELFDIR=	${ELFTCDIR}/readelf

.PATH: ${READELFDIR}

PROG=	readelf
SRCS=	readelf.c

LIBADD=	dwarf elftc elf

CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common

# This same hack is in lib/libelf/Makefile and lib/libdward/Makefile
# We need to link against the correct version of these files. One
# solution is to include ../../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>