Remove support for static linked OpenAL.

We haven't used that for years and it just complicates things.
This commit is contained in:
Yamagi Burmeister 2018-08-14 11:51:55 +02:00
parent daf3dc6f41
commit cf09fb2a99
2 changed files with 6 additions and 27 deletions

View file

@ -31,12 +31,6 @@
# installed
WITH_OPENAL:=yes
# Enables optional runtime loading of OpenAL (dlopen or
# similar). If set to "no", the library is linked in at
# compile time in the normal way. On Windows this option
# is ignored, OpenAL is always loaded at runtime.
DLOPEN_OPENAL:=yes
# Enable systemwide installation of game assets
WITH_SYSTEMWIDE:=no
@ -332,7 +326,7 @@ build/client/%.o: %.c
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(ZIPCFLAGS) $(INCLUDE) -o $@ $<
ifeq ($(WITH_OPENAL),yes)
release/yquake2.exe : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"openal32.dll"' -DDLOPEN_OPENAL
release/yquake2.exe : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"openal32.dll"'
endif
release/yquake2.exe : LDFLAGS += -mwindows
@ -359,23 +353,14 @@ endif
release/quake2 : CFLAGS += -Wno-unused-result
ifeq ($(WITH_OPENAL),yes)
ifeq ($(DLOPEN_OPENAL),yes)
ifeq ($(YQ2_OSTYPE), OpenBSD)
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so"' -DDLOPEN_OPENAL
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so"'
else ifeq ($(YQ2_OSTYPE), Darwin)
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.dylib"' -I/usr/local/opt/openal-soft/include -DDLOPEN_OPENAL
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.dylib"' -I/usr/local/opt/openal-soft/include
release/quake2 : LDFLAGS += -L/usr/local/opt/openal-soft/lib -rpath /usr/local/opt/openal-soft/lib
else
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so.1"' -DDLOPEN_OPENAL
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so.1"'
endif
else # !DLOPEN_OPENAL
release/quake2 : CFLAGS += -DUSE_OPENAL
release/quake2 : LDFLAGS += -lopenal
ifeq ($(YQ2_OSTYPE), Darwin)
release/quake2 : CFLAGS += -I/usr/local/opt/openal-soft/include
release/quake2 : LDFLAGS += -L/usr/local/opt/openal-soft/lib -rpath /usr/local/opt/openal-soft/lib
endif # Darwin
endif # !DLOPEN_OPENAL
endif # WITH_OPENAL
ifeq ($(YQ2_OSTYPE), FreeBSD)

View file

@ -43,9 +43,7 @@
static ALCcontext *context;
static ALCdevice *device;
static cvar_t *al_device;
#ifdef DLOPEN_OPENAL
static cvar_t *al_driver;
#endif
static void *handle;
/* Function pointers for OpenAL management */
@ -341,7 +339,6 @@ QAL_Init()
{
al_device = Cvar_Get("al_device", "", CVAR_ARCHIVE);
#ifdef DLOPEN_OPENAL
/* DEFAULT_OPENAL_DRIVER is defined at compile time via the compiler */
al_driver = Cvar_Get("al_driver", DEFAULT_OPENAL_DRIVER, CVAR_ARCHIVE);
@ -355,11 +352,8 @@ QAL_Init()
Com_Printf("Loading %s failed! Disabling OpenAL.\n", al_driver->string);
return false;
}
# define ALSYMBOL(handle, sym) Sys_GetProcAddress(handle, #sym)
#else
handle = NULL;
# define ALSYMBOL(handle, sym) sym
#endif
#define ALSYMBOL(handle, sym) Sys_GetProcAddress(handle, #sym)
/* Connect function pointers to management functions */
qalcCreateContext = ALSYMBOL(handle, alcCreateContext);