]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Add support for LINK_TO_LIBVORBIS (using pkg-config)
authorSimon McVittie <smcv@debian.org>
Tue, 5 Jul 2011 21:16:28 +0000 (22:16 +0100)
committernyov <nyov@nexnode.net>
Thu, 27 Nov 2014 09:41:03 +0000 (09:41 +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 1510b7279435949d704388462abda92a1127f164..9afb12e7fdd5d6b75d95906c83bfe4c75005fb0b 100644 (file)
--- a/makefile
+++ b/makefile
@@ -307,6 +307,11 @@ CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
 LIB_JPEG=-ljpeg
 endif
 
+ifdef LINK_TO_LIBVORBIS
+CFLAGS_LIBVORBIS=-DLINK_TO_LIBVORBIS `pkg-config --cflags vorbisfile`
+LIB_LIBVORBIS=`pkg-config --libs vorbisfile`
+endif
+
 ifdef LINK_TO_ZLIB
 CFLAGS_ZLIB=-DLINK_TO_ZLIB
 LIB_ZLIB=-lz
index bd018bb224dac90e4dbed46885e4514447397238..78448f72750c4ea6c9c486dd6c0a7ad52ad70e2f 100644 (file)
@@ -193,6 +193,7 @@ CFLAGS_COMMON=\
        $(CFLAGS_FS) \
        $(CFLAGS_WARNINGS) \
        $(CFLAGS_LIBJPEG) \
+       $(CFLAGS_LIBVORBIS) \
        $(CFLAGS_ZLIB) \
        $(CFLAGS_D3D) \
        -D_FILE_OFFSET_BITS=64 \
@@ -236,6 +237,7 @@ LDFLAGS_UNIXCOMMON=\
        $(LIB_GMP) \
        $(LIB_CRYPTO_RIJNDAEL)
 LDFLAGS_UNIXCL=\
+       $(LIB_LIBVORBIS) \
        -L$(UNIX_X11LIBPATH) \
        -lX11 \
        -lXpm \
@@ -274,6 +276,7 @@ CFLAGS_UNIX_PRELOAD=-DPREFER_PRELOAD
 
 LDFLAGS_UNIXSDL=\
        $(SDLCONFIG_LIBS) \
+       $(LIB_LIBVORBIS) \
        $(LIB_SND_MODPLUG)
 
 EXE_UNIXCL=darkplaces-glx