f947f58ce6
Rename the existing "elftoolchain" package to "toolchain", and move everything which is gated by MK_TOOLCHAIN (e.g. lex, yacc, ...) to the toolchain package. This means we have one package called "toolchain" which contains all the development-related utilities which are not compilers or already part of some other package (e.g., llvm). Reviewed by: des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50286
37 lines
901 B
Makefile
37 lines
901 B
Makefile
.include <src.opts.mk>
|
|
|
|
PACKAGE= toolchain
|
|
|
|
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>
|