]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Add support for "make LINK_TO_ZLIB=1"
authorSimon McVittie <smcv@debian.org>
Tue, 5 Jul 2011 21:09:07 +0000 (22:09 +0100)
committernyov <nyov@nexnode.net>
Thu, 27 Nov 2014 09:40:42 +0000 (09:40 +0000)
In Debian we want library dependencies to work in the conventional way,
since many tools expect that and use it to generate package
dependencies.

Origin: vendor, Debian

makefile
makefile.inc

index 2b2280494a072dce0bb8274532fa424f1f1756c3..1510b7279435949d704388462abda92a1127f164 100644 (file)
--- a/makefile
+++ b/makefile
@@ -307,6 +307,11 @@ CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
 LIB_JPEG=-ljpeg
 endif
 
+ifdef LINK_TO_ZLIB
+CFLAGS_ZLIB=-DLINK_TO_ZLIB
+LIB_ZLIB=-lz
+endif
+
 CFLAGS_PRELOAD=
 ifneq ($(DP_MAKE_TARGET), mingw)
 ifdef DP_PRELOAD_DEPENDENCIES
index bb721e001e6f0a7afd833323b7757035ccbe0932..bd018bb224dac90e4dbed46885e4514447397238 100644 (file)
@@ -193,6 +193,7 @@ CFLAGS_COMMON=\
        $(CFLAGS_FS) \
        $(CFLAGS_WARNINGS) \
        $(CFLAGS_LIBJPEG) \
+       $(CFLAGS_ZLIB) \
        $(CFLAGS_D3D) \
        -D_FILE_OFFSET_BITS=64 \
        -D__KERNEL_STRICT_NAMES
@@ -230,6 +231,7 @@ LDFLAGS_UNIXCOMMON=\
        -lm \
        $(LIB_ODE) \
        $(LIB_JPEG) \
+       $(LIB_ZLIB) \
        $(LIB_CRYPTO) \
        $(LIB_GMP) \
        $(LIB_CRYPTO_RIJNDAEL)