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