diff options
-rw-r--r-- | Makefile.target | 13 | ||||
-rw-r--r-- | audio/audio.c | 3 | ||||
-rwxr-xr-x | configure | 23 |
3 files changed, 27 insertions, 12 deletions
diff --git a/Makefile.target b/Makefile.target index 81a2dfb552..5690adcdca 100644 --- a/Makefile.target +++ b/Makefile.target @@ -1,11 +1,5 @@ include config.mak -#Uncomment following and specify proper paths/names for FMOD support -#USE_FMOD=1 -#FMOD_INCLUDE=/net/include/fmod -#FMOD_LIBPATH=/net/lib -#FMOD_VERSION=3.74 - TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH) VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH) @@ -288,11 +282,10 @@ ifdef CONFIG_ADLIB SOUND_HW += fmopl.o adlib.o endif -ifeq ($(USE_FMOD),1) +ifdef CONFIG_FMOD AUDIODRV += fmodaudio.o -audio.o fmodaudio.o: DEFINES := -DUSE_FMOD_AUDIO -I$(FMOD_INCLUDE) $(DEFINES) -LDFLAGS += -L$(FMOD_LIBPATH) -Wl,-rpath,$(FMOD_LIBPATH) -LIBS += -lfmod-$(FMOD_VERSION) +audio.o fmodaudio.o: DEFINES := -I$(CONFIG_FMOD_INC) $(DEFINES) +LIBS += $(CONFIG_FMOD_LIB) endif ifeq ($(TARGET_ARCH), i386) diff --git a/audio/audio.c b/audio/audio.c index 80170b96d4..661771e82e 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -24,7 +24,6 @@ #include <assert.h> #include "vl.h" -#define USE_SDL_AUDIO #define USE_WAV_AUDIO #include "audio/audio_int.h" @@ -779,7 +778,7 @@ static struct audio_output_driver *drvtab[] = { #ifdef CONFIG_OSS &oss_output_driver, #endif -#ifdef USE_FMOD_AUDIO +#ifdef CONFIG_FMOD &fmod_output_driver, #endif #ifdef CONFIG_SDL @@ -74,6 +74,9 @@ gdbstub="yes" slirp="yes" adlib="no" oss="no" +fmod="no" +fmod_lib="" +fmod_inc="" # OS specific targetos=`uname -s` @@ -150,6 +153,12 @@ for opt do ;; --disable-sdl) sdl="no" ;; + --enable-fmod) fmod="yes" + ;; + --fmod-lib=*) fmod_lib=${opt#--fmod-lib=} + ;; + --fmod-inc=*) fmod_inc=${opt#--fmod-inc=} + ;; --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" ;; --disable-slirp) slirp="no" @@ -285,6 +294,9 @@ echo " --cc=CC use C compiler CC [$cc]" echo " --make=MAKE use specified make [$make]" echo " --static enable static build [$static]" echo " --enable-mingw32 enable Win32 cross compilation with mingw32" +echo " --enable-fmod enable FMOD audio output driver" +echo " --fmod-lib path to FMOD library" +echo " --fmod-inc path to FMOD includes" echo "" echo "NOTE: The object files are build at the place where configure is launched" exit 1 @@ -327,6 +339,11 @@ echo "SDL support $sdl" echo "SDL static link $sdl_static" echo "mingw32 support $mingw32" echo "Adlib support $adlib" +echo -n "FMOD support $fmod" +if test $fmod = "yes"; then + echo -n " (lib='$fmod_lib' include='$fmod_inc')" +fi +echo "" if test $sdl_too_old = "yes"; then echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support" @@ -435,6 +452,12 @@ if test "$oss" = "yes" ; then echo "CONFIG_OSS=yes" >> $config_mak echo "#define CONFIG_OSS 1" >> $config_h fi +if test "$fmod" = "yes" ; then + echo "CONFIG_FMOD=yes" >> $config_mak + echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak + echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak + echo "#define CONFIG_FMOD 1" >> $config_h +fi echo -n "VERSION=" >>$config_mak head $source_path/VERSION >>$config_mak echo "" >>$config_mak |