summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2014-08-10 06:43:40 +0000
committerrpaulo <rpaulo@FreeBSD.org>2014-08-10 06:43:40 +0000
commit336929ba0943beb4a3b5aa87a837d1fce57c07a9 (patch)
tree4c7485bac67be8d2ef54024b821846510ef34c5f /share
parent5dd648cc55039b75729d4ea9ee4f415a86151504 (diff)
downloadFreeBSD-src-336929ba0943beb4a3b5aa87a837d1fce57c07a9.zip
FreeBSD-src-336929ba0943beb4a3b5aa87a837d1fce57c07a9.tar.gz
Fix a few problems with the USDT probes:
* Include OBJDIR to make sure the generated file is found; * Simplify the definition of OBJS; * Add targets for shared objects and for profiled objects. MFC after: 3 days
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.dep.mk21
1 files changed, 13 insertions, 8 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 06a4e4f..7fa8f23 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -125,21 +125,26 @@ ${_YC:R}.o: ${_YC}
.if ${SRCS:M*.d}
LDFLAGS+= -lelf
LDADD+= ${LIBELF}
-CFLAGS+= -D_DTRACE_VERSION=1
+CFLAGS+= -D_DTRACE_VERSION=1 -I${.OBJDIR}
.endif
.for _DSRC in ${SRCS:M*.d:N*/*}
.for _D in ${_DSRC:R}
${_D}.h: ${_DSRC}
${DTRACE} -xnolibs -h -s ${.ALLSRC}
SRCS:= ${SRCS:S/${_DSRC}/${_D}.h/}
-${_D}.o: ${_D}.h ${_DSRC} ${OBJS} ${SOBJS}
- ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${_DSRC} \
- ${OBJS:S/${_D}.o//} ${SOBJS:S/${_D}.o//}
-CLEANFILES+= ${_D}.h ${_D}.o
-.if defined(PROG)
OBJS+= ${_D}.o
-.else
-SOBJS+= ${_D}.o
+CLEANFILES+= ${_D}.h ${_D}.o
+${_D}.o: ${_D.h} ${OBJS:S/${_D}.o//}
+ ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.CURDIR}/${_DSRC} \
+ ${OBJS:S/${_D}.o//}
+.if defined(LIB)
+CLEANFILES+= ${_D}.So ${_D}.po
+${_D}.So: ${_D.h} ${SOBJS:S/${_D}.So//}
+ ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.CURDIR}/${_DSRC} \
+ ${SOBJS:S/${_D}.So//}
+${_D}.po: ${_D}.h ${POBJS:S/${_D}.po//}
+ ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.CURDIR}/${_DSRC} \
+ ${POBJS:S/${_D}.po//}
.endif
.endfor
.endfor
OpenPOWER on IntegriCloud