diff --git a/configure.ac b/configure.ac index d49b7223c..f2daf49dc 100644 --- a/configure.ac +++ b/configure.ac @@ -1270,6 +1270,7 @@ CD_TARGETS="" SND_TARGETS="" SND_PLUGIN_TARGETS="libsound_null.la libsound_disk.la" VID_TARGETS="" +BUILD_SND_RENDERER=no BUILD_GL=no BUILD_SW=no CAN_BUILD_GL=no @@ -1390,27 +1391,35 @@ if test -n "$CL_TARGETS"; then SND_TARGETS="libQFsound.la" if test "`echo $SOUND_TYPES | grep ALSA0.5`"; then SND_PLUGIN_TARGETS="$SND_PLUGIN_TARGETS libsound_alsa0_5.la" + BUILD_SND_RENDERER=yes fi if test "`echo $SOUND_TYPES | grep ALSA0.9`"; then SND_PLUGIN_TARGETS="$SND_PLUGIN_TARGETS libsound_alsa0_9.la" + BUILD_SND_RENDERER=yes fi if test "`echo $SOUND_TYPES | grep MME`"; then SND_PLUGIN_TARGETS="$SND_PLUGIN_TARGETS libsound_mme.la" + BUILD_SND_RENDERER=yes fi if test "`echo $SOUND_TYPES | grep OSS`"; then SND_PLUGIN_TARGETS="$SND_PLUGIN_TARGETS libsound_oss.la" + BUILD_SND_RENDERER=yes fi if test "`echo $SOUND_TYPES | grep SDL`"; then SND_PLUGIN_TARGETS="$SND_PLUGIN_TARGETS libsound_sdl.la" + BUILD_SND_RENDERER=yes fi if test "`echo $SOUND_TYPES | grep SGI`"; then SND_PLUGIN_TARGETS="$SND_PLUGIN_TARGETS libsound_sgi.la" + BUILD_SND_RENDERER=yes fi if test "`echo $SOUND_TYPES | grep SUN`"; then SND_PLUGIN_TARGETS="$SND_PLUGIN_TARGETS libsound_sun.la" + BUILD_SND_RENDERER=yes fi if test "`echo $SOUND_TYPES | grep Win32`"; then SND_PLUGIN_TARGETS="$SND_PLUGIN_TARGETS libsound_win.la" + BUILD_SND_RENDERER=yes fi VID_TARGETS="libQFjs.la $VID_TARGETS" else @@ -1429,6 +1438,7 @@ AC_SUBST(SND_TARGETS) AC_SUBST(SND_PLUGIN_TARGETS) AC_SUBST(VID_TARGETS) +AM_CONDITIONAL(BUILD_SND_RENDERER, test "$BUILD_SND_RENDERER" = "yes") AM_CONDITIONAL(BUILD_GL, test "$BUILD_GL" = "yes") AM_CONDITIONAL(BUILD_SW, test "$BUILD_SW" = "yes") diff --git a/libs/audio/targets/Makefile.am b/libs/audio/targets/Makefile.am index 43a3f3968..ecf37c28a 100644 --- a/libs/audio/targets/Makefile.am +++ b/libs/audio/targets/Makefile.am @@ -2,7 +2,15 @@ INCLUDES= -I$(top_srcdir)/include $(ALSA_CFLAGS) $(MME_CFLAGS) $(OSS_CFLAGS) $(S libdir = @PLUGINDIR@ -lib_LTLIBRARIES = @SND_PLUGIN_TARGETS@ +if BUILD_SND_RENDERER +SND_RENDERER = libQFsoundrenderer.la +else +SND_RENDERER = +endif + +SND_RENDERER_LIB = $(top_builddir)/libs/audio/targets/libQFsoundrenderer.la + +lib_LTLIBRARIES = $(SND_RENDERER) @SND_PLUGIN_TARGETS@ EXTRA_LTLIBRARIES = libsound_sdl.la libsound_alsa0_5.la libsound_alsa0_9.la libsound_oss.la libsound_sgi.la libsound_sun.la libsound_win.la libsound_null.la libsound_disk.la if ASM_ARCH @@ -15,53 +23,66 @@ noinst_LTLIBRARIES = $(ASM) libasm_la_SOURCES = snd_mixa.S -common_sound_files= snd_dma.c snd_mem.c snd_mix.c +libQFsoundrenderer_la_LDFLAGS= -version-info 1:0:0 +libQFsoundrenderer_la_LIBADD = $(ASM) +libQFsoundrenderer_la_SOURCES= snd_dma.c snd_mem.c snd_mix.c +libQFsoundrenderer.la: $(libQFsoundrenderer_la_OBJECTS) $(libQFsoundrenderer_la_DEPENDENCIES) + $(LINK) -rpath $(pluginpath) $(libQFsoundrenderer_la_LDFLAGS) $(libQFsoundrenderer_la_OBJECTS) $(libQFsoundrenderer_la_LIBADD) $(LIBS) -libsound_sdl_la_LDFLAGS= -version-info 1:0:0 $(SDL_LIBS) -libsound_sdl_la_LIBADD = $(ASM) -libsound_sdl_la_SOURCES= $(common_sound_files) snd_sdl.c + +libsound_sdl_la_LDFLAGS= -version-info 1:0:0 $(SDL_LIBS) -lQFsoundrenderer +libsound_sdl_la_LIBS = $(SND_RENDERER_LIB) +libsound_sdl_la_LIB_DEPS= $(SND_RENDERER_LIB) +libsound_sdl_la_SOURCES= snd_sdl.c libsound_sdl.la: $(libsound_sdl_la_OBJECTS) $(libsound_sdl_la_DEPENDENCIES) $(LINK) -rpath $(pluginpath) $(libsound_sdl_la_LDFLAGS) $(libsound_sdl_la_OBJECTS) $(libsound_sdl_la_LIBADD) $(LIBS) -libsound_alsa0_5_la_LDFLAGS= -version-info 1:0:0 $(ALSA_LIBS) -libsound_alsa0_5_la_LIBADD = $(ASM) -libsound_alsa0_5_la_SOURCES= $(common_sound_files) snd_alsa_0_5.c +libsound_alsa0_5_la_LDFLAGS= -version-info 1:0:0 $(ALSA_LIBS) -lQFsoundrenderer +libsound_alsa0_5_la_LIBS = $(SND_RENDERER_LIB) +libsound_alsa0_5_la_LIB_DEPS= $(SND_RENDERER_LIB) +libsound_alsa0_5_la_SOURCES= snd_alsa_0_5.c libsound_alsa0_5.la: $(libsound_alsa0_5_la_OBJECTS) $(libsound_alsa0_5_la_DEPENDENCIES) $(LINK) -rpath $(pluginpath) $(libsound_alsa0_5_la_LDFLAGS) $(libsound_alsa0_5_la_OBJECTS) $(libsound_alsa0_5_la_LIBADD) $(LIBS) -libsound_alsa0_9_la_LDFLAGS= -version-info 1:0:0 $(ALSA_LIBS) -libsound_alsa0_9_la_LIBADD = $(ASM) -libsound_alsa0_9_la_SOURCES= $(common_sound_files) snd_alsa_0_9.c +libsound_alsa0_9_la_LDFLAGS= -version-info 1:0:0 $(ALSA_LIBS) -lQFsoundrenderer +libsound_alsa0_9_la_LIBS = $(SND_RENDERER_LIB) +libsound_alsa0_9_la_LIB_DEPS= $(SND_RENDERER_LIB) +libsound_alsa0_9_la_SOURCES= snd_alsa_0_9.c libsound_alsa0_9.la: $(libsound_alsa0_9_la_OBJECTS) $(libsound_alsa0_9_la_DEPENDENCIES) $(LINK) -rpath $(pluginpath) $(libsound_alsa0_9_la_LDFLAGS) $(libsound_alsa0_9_la_OBJECTS) $(libsound_alsa0_9_la_LIBADD) $(LIBS) -libsound_oss_la_LDFLAGS= -version-info 1:0:0 $(OSS_LIBS) $(OSS_LIBS) -libsound_oss_la_LIBADD = $(ASM) -libsound_oss_la_SOURCES= $(common_sound_files) snd_oss.c +libsound_oss_la_LDFLAGS= -version-info 1:0:0 $(OSS_LIBS) -lQFsoundrenderer +libsound_oss_la_LIBS = $(SND_RENDERER_LIB) +libsound_oss_la_LIB_DEPS= $(SND_RENDERER_LIB) +libsound_oss_la_SOURCES= snd_oss.c libsound_oss.la: $(libsound_oss_la_OBJECTS) $(libsound_oss_la_DEPENDENCIES) $(LINK) -rpath $(pluginpath) $(libsound_oss_la_LDFLAGS) $(libsound_oss_la_OBJECTS) $(libsound_oss_la_LIBADD) $(LIBS) -libsound_sgi_la_LDFLAGS= -version-info 1:0:0 $(SGISND_LIBS) -libsound_sgi_la_LIBADD = $(ASM) -libsound_sgi_la_SOURCES= $(common_sound_files) snd_sgi.c +libsound_sgi_la_LDFLAGS= -version-info 1:0:0 $(SGISND_LIBS) -lQFsoundrenderer +libsound_sgi_la_LIBS = $(SND_RENDERER_LIB) +libsound_sgi_la_LIB_DEPS= $(SND_RENDERER_LIB) +libsound_sgi_la_SOURCES= snd_sgi.c libsound_sgi.la: $(libsound_sgi_la_OBJECTS) $(libsound_sgi_la_DEPENDENCIES) $(LINK) -rpath $(pluginpath) $(libsound_sgi_la_LDFLAGS) $(libsound_sgi_la_OBJECTS) $(libsound_sgi_la_LIBADD) $(LIBS) -libsound_sun_la_LDFLAGS= -version-info 1:0:0 $(SUN_LIBS) -libsound_sun_la_LIBADD = $(ASM) -libsound_sun_la_SOURCES= $(common_sound_files) snd_sun.c +libsound_sun_la_LDFLAGS= -version-info 1:0:0 $(SUN_LIBS) -lQFsoundrenderer +libsound_sun_la_LIBS = $(SND_RENDERER_LIB) +libsound_sun_la_LIB_DEPS= $(SND_RENDERER_LIB) +libsound_sun_la_SOURCES= snd_sun.c libsound_sun.la: $(libsound_sun_la_OBJECTS) $(libsound_sun_la_DEPENDENCIES) $(LINK) -rpath $(pluginpath) $(libsound_sun_la_LDFLAGS) $(libsound_sun_la_OBJECTS) $(libsound_sun_la_LIBADD) $(LIBS) -libsound_win_la_LDFLAGS= -version-info 1:0:0 $(WIN_LIBS) -libsound_win_la_LIBADD = $(ASM) -libsound_win_la_SOURCES= $(common_sound_files) snd_win.c +libsound_win_la_LDFLAGS= -version-info 1:0:0 $(WIN_LIBS) -lQFsoundrenderer +libsound_win_la_LIBS = $(SND_RENDERER_LIB) +libsound_win_la_LIB_DEPS= $(SND_RENDERER_LIB) +libsound_win_la_SOURCES= snd_win.c libsound_win.la: $(libsound_win_la_OBJECTS) $(libsound_win_la_DEPENDENCIES) $(LINK) -rpath $(pluginpath) $(libsound_win_la_LDFLAGS) $(libsound_win_la_OBJECTS) $(libsound_win_la_LIBADD) $(LIBS) -libsound_disk_la_LDFLAGS= -version-info 1:0:0 -libsound_disk_la_LIBADD = $(ASM) -libsound_disk_la_SOURCES= $(common_sound_files) snd_disk.c +libsound_disk_la_LDFLAGS= -version-info 1:0:0 -lQFsoundrenderer +libsound_disk_la_LIBS = $(SND_RENDERER_LIB) +libsound_disk_la_LIB_DEPS= $(SND_RENDERER_LIB) +libsound_disk_la_SOURCES= snd_disk.c libsound_disk.la: $(libsound_disk_la_OBJECTS) $(libsound_disk_la_DEPENDENCIES) $(LINK) -rpath $(pluginpath) $(libsound_disk_la_LDFLAGS) $(libsound_disk_la_OBJECTS) $(libsound_disk_la_LIBADD) $(LIBS) @@ -70,4 +91,4 @@ libsound_null_la_SOURCES= snd_null.c libsound_null.la: $(libsound_null_la_OBJECTS) $(libsound_null_la_DEPENDENCIES) $(LINK) -rpath $(pluginpath) $(libsound_null_la_LDFLAGS) $(libsound_null_la_OBJECTS) $(libsound_null_la_LIBADD) $(LIBS) -LIBLIST = $(pkglib_LTLIBRARIES) @LIBRARY_SEARCH_PATH@ +LIBLIST = $(pkglib_LTLIBRARIES) libQFsoundrenderer.la @LIBRARY_SEARCH_PATH@