link libexec helpers against _p libraries when building with 'make PROFILE=1'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
diff --git a/libexec/got-fetch-pack/Makefile b/libexec/got-fetch-pack/Makefile
index fb60037..1cbeffd 100644
--- a/libexec/got-fetch-pack/Makefile
+++ b/libexec/got-fetch-pack/Makefile
@@ -7,7 +7,12 @@ SRCS= got-fetch-pack.c error.c inflate.c object_parse.c \
path.c privsep.c sha1.c pkt.c gitproto.c ratelimit.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-index-pack/Makefile b/libexec/got-index-pack/Makefile
index 08a453b..3af9d7f 100644
--- a/libexec/got-index-pack/Makefile
+++ b/libexec/got-index-pack/Makefile
@@ -7,7 +7,13 @@ SRCS= got-index-pack.c error.c inflate.c object_parse.c object_idset.c \
delta_cache.c delta.c pack.c path.c privsep.c sha1.c ratelimit.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-read-blob/Makefile b/libexec/got-read-blob/Makefile
index 17ab97b..427fba8 100644
--- a/libexec/got-read-blob/Makefile
+++ b/libexec/got-read-blob/Makefile
@@ -7,7 +7,13 @@ SRCS= got-read-blob.c error.c inflate.c object_parse.c \
path.c privsep.c sha1.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-read-commit/Makefile b/libexec/got-read-commit/Makefile
index 3f6f7ca..a5aaaae 100644
--- a/libexec/got-read-commit/Makefile
+++ b/libexec/got-read-commit/Makefile
@@ -7,7 +7,13 @@ SRCS= got-read-commit.c error.c inflate.c object_parse.c \
path.c privsep.c sha1.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-read-gitconfig/Makefile b/libexec/got-read-gitconfig/Makefile
index f49bf06..326e9b9 100644
--- a/libexec/got-read-gitconfig/Makefile
+++ b/libexec/got-read-gitconfig/Makefile
@@ -7,7 +7,13 @@ SRCS= got-read-gitconfig.c error.c inflate.c object_parse.c \
path.c privsep.c sha1.c gitconfig.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-read-gotconfig/Makefile b/libexec/got-read-gotconfig/Makefile
index a683cf2..952f34c 100644
--- a/libexec/got-read-gotconfig/Makefile
+++ b/libexec/got-read-gotconfig/Makefile
@@ -7,7 +7,13 @@ SRCS= got-read-gotconfig.c error.c inflate.c object_parse.c \
path.c privsep.c sha1.c parse.y
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib -I${.CURDIR}
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-read-object/Makefile b/libexec/got-read-object/Makefile
index 2634211..35015b3 100644
--- a/libexec/got-read-object/Makefile
+++ b/libexec/got-read-object/Makefile
@@ -7,7 +7,13 @@ SRCS= got-read-object.c error.c inflate.c object_parse.c \
path.c privsep.c sha1.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-read-pack/Makefile b/libexec/got-read-pack/Makefile
index 5fe2b7e..ceb42b9 100644
--- a/libexec/got-read-pack/Makefile
+++ b/libexec/got-read-pack/Makefile
@@ -8,7 +8,13 @@ SRCS= got-read-pack.c delta.c error.c inflate.c object_cache.c \
privsep.c sha1.c delta_cache.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-read-patch/Makefile b/libexec/got-read-patch/Makefile
index 9eddbae..8c35830 100644
--- a/libexec/got-read-patch/Makefile
+++ b/libexec/got-read-patch/Makefile
@@ -7,7 +7,13 @@ SRCS= got-read-patch.c error.c inflate.c object_parse.c \
path.c privsep.c sha1.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
-LDADD = -lz -lutil
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
+LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-read-tag/Makefile b/libexec/got-read-tag/Makefile
index a8026e4..7598ada 100644
--- a/libexec/got-read-tag/Makefile
+++ b/libexec/got-read-tag/Makefile
@@ -7,7 +7,13 @@ SRCS= got-read-tag.c error.c inflate.c object_parse.c \
path.c privsep.c sha1.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-read-tree/Makefile b/libexec/got-read-tree/Makefile
index 397775d..368c851 100644
--- a/libexec/got-read-tree/Makefile
+++ b/libexec/got-read-tree/Makefile
@@ -7,7 +7,13 @@ SRCS= got-read-tree.c error.c inflate.c object_parse.c \
path.c privsep.c sha1.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>
diff --git a/libexec/got-send-pack/Makefile b/libexec/got-send-pack/Makefile
index 8e79a14..fb9f610 100644
--- a/libexec/got-send-pack/Makefile
+++ b/libexec/got-send-pack/Makefile
@@ -7,7 +7,13 @@ SRCS= got-send-pack.c error.c inflate.c object_parse.c \
path.c privsep.c sha1.c pkt.c gitproto.c ratelimit.c
CPPFLAGS = -I${.CURDIR}/../../include -I${.CURDIR}/../../lib
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p
+.else
LDADD = -lutil -lz
+.endif
+
DPADD = ${LIBZ} ${LIBUTIL}
.include <bsd.prog.mk>