Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 7d11074

Browse files
committed
Make USE_BUNDLED_ZLIB configurable
This further prepares for static builds, allowing to fully depend on bundled libraries. Signed-off-by: Hidde Beydals <[email protected]>
1 parent adda470 commit 7d11074

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

hack/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ BUILD_TYPE ?= "RelWithDebInfo"
1717
FLAGS ?=
1818
USE_HTTPS ?= OFF
1919
USE_SSH ?= OFF
20+
USE_BUNDLED_ZLIB ?= OFF
2021
BUILD_SHARED_LIBS ?= ON
2122

2223
# Cmake version to be installed.
@@ -66,20 +67,25 @@ ifeq (debian,$(XX_VENDOR))
6667
# certain key formats).
6768
# Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668271
6869
# Ref: https://github.com/ARMmbed/mbedtls/issues/2452#issuecomment-802683144
69-
DEPENDENCIES = zlib1g-dev
70+
DEPENDENCIES =
71+
ifneq ("OFF",$(USE_BUNDLED_ZLIB))
72+
DEPENDENCIES += zlib1g-dev
73+
endif
7074
ifneq ("OFF",$(USE_HTTPS))
7175
DEPENDENCIES += libssl-dev
7276
endif
7377
ifneq ("OFF",$(USE_SSH))
7478
DEPENDENCIES += libssh2-1-dev
7579
endif
7680
dependencies:
81+
ifneq ("",$(DEPENDENCIES))
7782
set -e; \
7883
echo "deb http://deb.debian.org/debian sid main" > /etc/apt/sources.list.d/sid.list \
7984
&& echo "deb-src http://deb.debian.org/debian sid main" /etc/apt/sources.list.d/sid.list \
8085
&& xx-apt update \
8186
&& xx-apt -t sid install --no-install-recommends -y $(DEPENDENCIES)
8287
endif
88+
endif
8389
.PHONY: dependencies
8490

8591
libgit2: $(LIBGIT2)

0 commit comments

Comments
 (0)