aboutsummaryrefslogtreecommitdiffstats
path: root/mk/prog.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/prog.mk')
-rw-r--r--mk/prog.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/mk/prog.mk b/mk/prog.mk
index 99fd7e81f50e..3a7a07ea78ed 100644
--- a/mk/prog.mk
+++ b/mk/prog.mk
@@ -1,4 +1,4 @@
-# $Id: prog.mk,v 1.24 2012/12/13 23:04:14 sjg Exp $
+# $Id: prog.mk,v 1.25 2013/07/18 05:46:24 sjg Exp $
.if !target(__${.PARSEFILE}__)
__${.PARSEFILE}__:
@@ -50,6 +50,15 @@ LIBCRT0= ${DESTDIR}/usr/lib/crt0.o
.include <dpadd.mk>
.endif
+.if ${MK_GPROF} == "yes"
+CFLAGS+= ${CC_PG} ${PROFFLAGS}
+LDADD+= ${CC_PG}
+.if ${MK_DPADD_MK} == "no"
+LDADD_LIBC_P?= -lc_p
+LDADD_LAST+= ${LDADD_LIBC_P}
+.endif
+.endif
+
.if defined(SHAREDSTRINGS)
CLEANFILES+=strings
.c.o: