xref: /freebsd/usr.bin/readelf/Makefile (revision f198d817224bcf428a2f5df90eb59753ed6e2459)
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
94aa63711SBryan DrewerySRCS=	readelf.c
1024320828SEd Maste
1124320828SEd MasteLIBADD=	dwarf elftc elf
1224320828SEd Maste
1324320828SEd MasteCFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
1424320828SEd Maste
15*f198d817SBryan Drewery# This same hack is in lib/libelf/Makefile and lib/libdwarf/Makefile
164aa63711SBryan Drewery# We need to link against the correct version of these files. One
174aa63711SBryan Drewery# solution is to include ../../sys in the include path. This causes
184aa63711SBryan Drewery# problems when a header file in sys depends on a file in another
194aa63711SBryan Drewery# part of the tree, e.g. a machine dependent header.
204aa63711SBryan Drewery#
214aa63711SBryan DrewerySRCS+=		sys/elf32.h sys/elf64.h sys/elf_common.h
224aa63711SBryan DreweryCLEANDIRS=	sys
234aa63711SBryan DreweryCFLAGS+=	-I.
244aa63711SBryan Drewerysys/elf32.h sys/elf64.h sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
254aa63711SBryan Drewery	mkdir -p ${.OBJDIR}/sys
264aa63711SBryan Drewery	ln -sf ${.ALLSRC} ${.TARGET}
274aa63711SBryan Drewery
2824320828SEd Maste.include <bsd.prog.mk>
29