xref: /freebsd/usr.bin/readelf/Makefile (revision 4aa63711a7423cb419d1225ca4576b3614658454)
124320828SEd Maste# $FreeBSD$
224320828SEd Maste
324320828SEd MasteELFTCDIR=	${.CURDIR}/../../contrib/elftoolchain
424320828SEd MasteREADELFDIR=	${ELFTCDIR}/readelf
524320828SEd Maste
624320828SEd Maste.PATH: ${READELFDIR}
724320828SEd Maste
824320828SEd MastePROG=	readelf
9*4aa63711SBryan DrewerySRCS=	readelf.c
1024320828SEd Maste
1124320828SEd MasteLIBADD=	dwarf elftc elf
1224320828SEd Maste
1324320828SEd MasteCFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
1424320828SEd Maste
15*4aa63711SBryan Drewery# This same hack is in lib/libelf/Makefile and lib/libdward/Makefile
16*4aa63711SBryan Drewery# We need to link against the correct version of these files. One
17*4aa63711SBryan Drewery# solution is to include ../../sys in the include path. This causes
18*4aa63711SBryan Drewery# problems when a header file in sys depends on a file in another
19*4aa63711SBryan Drewery# part of the tree, e.g. a machine dependent header.
20*4aa63711SBryan Drewery#
21*4aa63711SBryan DrewerySRCS+=		sys/elf32.h sys/elf64.h sys/elf_common.h
22*4aa63711SBryan DreweryCLEANDIRS=	sys
23*4aa63711SBryan DreweryCFLAGS+=	-I.
24*4aa63711SBryan Drewerysys/elf32.h sys/elf64.h sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
25*4aa63711SBryan Drewery	mkdir -p ${.OBJDIR}/sys
26*4aa63711SBryan Drewery	ln -sf ${.ALLSRC} ${.TARGET}
27*4aa63711SBryan Drewery
2824320828SEd Maste.include <bsd.prog.mk>
29