summaryrefslogtreecommitdiffstats
path: root/lib/libelftc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libelftc')
-rw-r--r--lib/libelftc/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libelftc/Makefile b/lib/libelftc/Makefile
index eed7acf..5a9d17d 100644
--- a/lib/libelftc/Makefile
+++ b/lib/libelftc/Makefile
@@ -29,4 +29,17 @@ CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
MAN=
+# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
+# 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/elf_common.h
+CLEANDIRS= sys
+CFLAGS+= -I.
+sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
+ mkdir -p ${.OBJDIR}/sys
+ ln -sf ${.ALLSRC} ${.TARGET}
+
.include <bsd.lib.mk>
OpenPOWER on IntegriCloud