summaryrefslogtreecommitdiff
path: root/lib/libdwarf
diff options
context:
space:
mode:
authorKai Wang <kaiw@FreeBSD.org>2014-01-21 20:42:15 +0000
committerKai Wang <kaiw@FreeBSD.org>2014-01-21 20:42:15 +0000
commit6eabfa967042e60221a66b4b2cb6f603336a2619 (patch)
tree2790c191ec0e6eef37125413ae268eb95067cc34 /lib/libdwarf
parenta1abeb052e4fb343af16e2a54d80a23605c32d6f (diff)
downloadsrc-test2-6eabfa967042e60221a66b4b2cb6f603336a2619.tar.gz
src-test2-6eabfa967042e60221a66b4b2cb6f603336a2619.zip
Notes
Diffstat (limited to 'lib/libdwarf')
-rw-r--r--lib/libdwarf/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libdwarf/Makefile b/lib/libdwarf/Makefile
index 5366733c4c1d..aa4197fb1540 100644
--- a/lib/libdwarf/Makefile
+++ b/lib/libdwarf/Makefile
@@ -75,14 +75,27 @@ SRCS= \
INCS= dwarf.h libdwarf.h
+#
+# 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
+
GENSRCS= dwarf_pubnames.c dwarf_pubtypes.c dwarf_weaks.c \
dwarf_funcs.c dwarf_vars.c dwarf_types.c \
dwarf_pro_pubnames.c dwarf_pro_weaks.c \
dwarf_pro_funcs.c dwarf_pro_types.c \
dwarf_pro_vars.c
CLEANFILES= ${GENSRCS}
+CLEANDIRS= sys
CFLAGS+= -I. -I${SRCDIR} -I${TOP}/common -I${TOP}/libelf
+sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET}
+ mkdir -p ${.OBJDIR}/sys
+ ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET}
+
LDADD+= -lelf
DPADD+= ${LIBELF}