diff --git a/base/lib.mak b/base/lib.mak
index e8ee4e7..4abaa05 100644
--- a/base/lib.mak
+++ b/base/lib.mak
@@ -589,7 +589,9 @@ srlx_h=$(GLSRC)srlx.h
 sstring_h=$(GLSRC)sstring.h
 strimpl_h=$(GLSRC)strimpl.h $(scommon_h) $(gstypes_h) $(gsstruct_h)
 szlibx_h=$(GLSRC)szlibx.h
+ifneq ($(SHARE_ZLIB),1)
 zlib_h=$(ZSRCDIR)$(D)zlib.h
+endif
 # We have two of the following, for shared zlib (_1)
 # and 'local' zlib (_0)
 szlibxx_h_1=$(GLSRC)szlibxx.h $(szlibx_h)
