From 70c042d9738e08160348dd674a27eb3274f364c2 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 13 Dec 2007 16:33:57 +0000 Subject: [PATCH] added -lmodplug if libmodplug.a is detected, and a corresponding #define to tell the code about this linkage, openSUSE 10.3 does not include libmodplug.so so this is sadly necessary git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7794 d7cf8633-e32d-0410-b094-e92efae38249 --- makefile | 6 ++++++ makefile.inc | 3 +++ 2 files changed, 9 insertions(+) diff --git a/makefile b/makefile index 45b2d97f..4423d411 100644 --- a/makefile +++ b/makefile @@ -199,12 +199,18 @@ endif ifeq ($(DP_SOUND_API), OSS) OBJ_SOUND=$(OBJ_SND_OSS) LIB_SOUND=$(LIB_SND_OSS) + ifneq ($(shell [ -e /usr/lib64/libmodplug.a ] || [ -e /usr/lib/libmodplug.a ]), false) + LIB_SOUND+=-lmodplug -lstdc++ + endif endif # ALSA: Advanced Linux Sound Architecture ifeq ($(DP_SOUND_API), ALSA) OBJ_SOUND=$(OBJ_SND_ALSA) LIB_SOUND=$(LIB_SND_ALSA) + ifneq ($(shell [ -e /usr/lib64/libmodplug.a ] || [ -e /usr/lib/libmodplug.a ]), false) + LIB_SOUND+=-lmodplug -lstdc++ + endif endif # COREAUDIO: Core Audio diff --git a/makefile.inc b/makefile.inc index 1d7ee8b9..1ba224ba 100644 --- a/makefile.inc +++ b/makefile.inc @@ -396,6 +396,9 @@ bin-release : LDFLAGS="$(LDFLAGS_RELEASE) $(LDFLAGS_COMMON)" $(STRIP) $(EXE) +snd_modplug.o: snd_modplug.c + if [ -e /usr/lib64/libmodplug.a ] || [ -e /usr/lib/libmodplug.a ] ; then $(DO_CC) -DSND_MODPLUG_STATIC ; else $(DO_CC) ; fi + vid_glx.o: vid_glx.c $(DO_CC) -I/usr/X11R6/include -- 2.39.2