aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cddl/lib/drti/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/cddl/lib/drti/Makefile b/cddl/lib/drti/Makefile
index ffd161c89d2a..57b161f74e17 100644
--- a/cddl/lib/drti/Makefile
+++ b/cddl/lib/drti/Makefile
@@ -8,13 +8,20 @@ FILESOWN= ${LIBOWN}
FILESGRP= ${LIBGRP}
FILESMODE= ${LIBMODE}
FILESDIR= ${LIBDIR}/dtrace
-CLEANFILES= ${FILES}
+CLEANFILES= ${FILES} ${FILES}.tmp
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/head \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
- -I${OPENSOLARIS_SYS_DISTDIR}/uts/common
+ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
+ -DPIC -fpic
+
+.c.o:
+ ${CC} ${CFLAGS} -c ${.IMPSRC}
+ mv ${FILES} ${FILES}.tmp
+ ${LD} -o ${FILES} -r ${FILES}.tmp ${LIBELF_PIC}
+ rm -f ${FILES}.tmp
.include <bsd.prog.mk>