mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-30 16:01:46 +00:00
link against libopenal by default rather than dlopening it
This commit is contained in:
parent
17719e0c61
commit
1c2722a9ba
3 changed files with 126 additions and 1 deletions
|
@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#include "qal.h"
|
||||
|
||||
#ifdef USE_OPENAL_DLOPEN
|
||||
#if defined _WIN32
|
||||
#include <windows.h>
|
||||
#define OBJTYPE HMODULE
|
||||
|
@ -340,5 +341,12 @@ void QAL_Shutdown( void )
|
|||
qalcGetString = NULL;
|
||||
qalcGetIntegerv = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
qboolean QAL_Init(const char *libname)
|
||||
{
|
||||
return qtrue;
|
||||
}
|
||||
void QAL_Shutdown( void )
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -28,11 +28,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include "../qcommon/q_shared.h"
|
||||
#include "../qcommon/qcommon.h"
|
||||
|
||||
#ifdef USE_OPENAL_DLOPEN
|
||||
#define AL_NO_PROTOTYPES
|
||||
#define ALC_NO_PROTOTYPES
|
||||
#endif
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
|
||||
#ifdef USE_OPENAL_DLOPEN
|
||||
extern LPALENABLE qalEnable;
|
||||
extern LPALDISABLE qalDisable;
|
||||
extern LPALISENABLED qalIsEnabled;
|
||||
|
@ -127,6 +130,102 @@ extern LPALCCAPTURECLOSEDEVICE qalcCaptureCloseDevice;
|
|||
extern LPALCCAPTURESTART qalcCaptureStart;
|
||||
extern LPALCCAPTURESTOP qalcCaptureStop;
|
||||
extern LPALCCAPTURESAMPLES qalcCaptureSamples;
|
||||
#else
|
||||
#define qalEnable alEnable
|
||||
#define qalDisable alDisable
|
||||
#define qalIsEnabled alIsEnabled
|
||||
#define qalGetString alGetString
|
||||
#define qalGetBooleanv alGetBooleanv
|
||||
#define qalGetIntegerv alGetIntegerv
|
||||
#define qalGetFloatv alGetFloatv
|
||||
#define qalGetDoublev alGetDoublev
|
||||
#define qalGetBoolean alGetBoolean
|
||||
#define qalGetInteger alGetInteger
|
||||
#define qalGetFloat alGetFloat
|
||||
#define qalGetDouble alGetDouble
|
||||
#define qalGetError alGetError
|
||||
#define qalIsExtensionPresent alIsExtensionPresent
|
||||
#define qalGetProcAddress alGetProcAddress
|
||||
#define qalGetEnumValue alGetEnumValue
|
||||
#define qalListenerf alListenerf
|
||||
#define qalListener3f alListener3f
|
||||
#define qalListenerfv alListenerfv
|
||||
#define qalListeneri alListeneri
|
||||
#define qalListener3i alListener3i
|
||||
#define qalListeneriv alListeneriv
|
||||
#define qalGetListenerf alGetListenerf
|
||||
#define qalGetListener3f alGetListener3f
|
||||
#define qalGetListenerfv alGetListenerfv
|
||||
#define qalGetListeneri alGetListeneri
|
||||
#define qalGetListener3i alGetListener3i
|
||||
#define qalGetListeneriv alGetListeneriv
|
||||
#define qalGenSources alGenSources
|
||||
#define qalDeleteSources alDeleteSources
|
||||
#define qalIsSource alIsSource
|
||||
#define qalSourcef alSourcef
|
||||
#define qalSource3f alSource3f
|
||||
#define qalSourcefv alSourcefv
|
||||
#define qalSourcei alSourcei
|
||||
#define qalSource3i alSource3i
|
||||
#define qalSourceiv alSourceiv
|
||||
#define qalGetSourcef alGetSourcef
|
||||
#define qalGetSource3f alGetSource3f
|
||||
#define qalGetSourcefv alGetSourcefv
|
||||
#define qalGetSourcei alGetSourcei
|
||||
#define qalGetSource3i alGetSource3i
|
||||
#define qalGetSourceiv alGetSourceiv
|
||||
#define qalSourcePlayv alSourcePlayv
|
||||
#define qalSourceStopv alSourceStopv
|
||||
#define qalSourceRewindv alSourceRewindv
|
||||
#define qalSourcePausev alSourcePausev
|
||||
#define qalSourcePlay alSourcePlay
|
||||
#define qalSourceStop alSourceStop
|
||||
#define qalSourceRewind alSourceRewind
|
||||
#define qalSourcePause alSourcePause
|
||||
#define qalSourceQueueBuffers alSourceQueueBuffers
|
||||
#define qalSourceUnqueueBuffers alSourceUnqueueBuffers
|
||||
#define qalGenBuffers alGenBuffers
|
||||
#define qalDeleteBuffers alDeleteBuffers
|
||||
#define qalIsBuffer alIsBuffer
|
||||
#define qalBufferData alBufferData
|
||||
#define qalBufferf alBufferf
|
||||
#define qalBuffer3f alBuffer3f
|
||||
#define qalBufferfv alBufferfv
|
||||
#define qalBufferi alBufferi
|
||||
#define qalBuffer3i alBuffer3i
|
||||
#define qalBufferiv alBufferiv
|
||||
#define qalGetBufferf alGetBufferf
|
||||
#define qalGetBuffer3f alGetBuffer3f
|
||||
#define qalGetBufferfv alGetBufferfv
|
||||
#define qalGetBufferi alGetBufferi
|
||||
#define qalGetBuffer3i alGetBuffer3i
|
||||
#define qalGetBufferiv alGetBufferiv
|
||||
#define qalDopplerFactor alDopplerFactor
|
||||
#define qalDopplerVelocity alDopplerVelocity
|
||||
#define qalSpeedOfSound alSpeedOfSound
|
||||
#define qalDistanceModel alDistanceModel
|
||||
|
||||
#define qalcCreateContext alcCreateContext
|
||||
#define qalcMakeContextCurrent alcMakeContextCurrent
|
||||
#define qalcProcessContext alcProcessContext
|
||||
#define qalcSuspendContext alcSuspendContext
|
||||
#define qalcDestroyContext alcDestroyContext
|
||||
#define qalcGetCurrentContext alcGetCurrentContext
|
||||
#define qalcGetContextsDevice alcGetContextsDevice
|
||||
#define qalcOpenDevice alcOpenDevice
|
||||
#define qalcCloseDevice alcCloseDevice
|
||||
#define qalcGetError alcGetError
|
||||
#define qalcIsExtensionPresent alcIsExtensionPresent
|
||||
#define qalcGetProcAddress alcGetProcAddress
|
||||
#define qalcGetEnumValue alcGetEnumValue
|
||||
#define qalcGetString alcGetString
|
||||
#define qalcGetIntegerv alcGetIntegerv
|
||||
#define qalcCaptureOpenDevice alcCaptureOpenDevice
|
||||
#define qalcCaptureCloseDevice alcCaptureCloseDevice
|
||||
#define qalcCaptureStart alcCaptureStart
|
||||
#define qalcCaptureStop alcCaptureStop
|
||||
#define qalcCaptureSamples alcCaptureSamples
|
||||
#endif
|
||||
|
||||
qboolean QAL_Init(const char *libname);
|
||||
void QAL_Shutdown( void );
|
||||
|
|
|
@ -51,6 +51,10 @@ ifndef USE_OPENAL
|
|||
USE_OPENAL=1
|
||||
endif
|
||||
|
||||
ifndef USE_OPENAL_DLOPEN
|
||||
USE_OPENAL_DLOPEN=0
|
||||
endif
|
||||
|
||||
ifndef BUILD_CLIENT
|
||||
BUILD_CLIENT=1
|
||||
endif
|
||||
|
@ -121,6 +125,9 @@ ifeq ($(PLATFORM),linux)
|
|||
|
||||
ifeq ($(USE_OPENAL),1)
|
||||
BASE_CFLAGS += -DUSE_OPENAL=1
|
||||
ifeq ($(USE_OPENAL_DLOPEN),1)
|
||||
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(USE_SDL),1)
|
||||
|
@ -168,6 +175,10 @@ ifeq ($(PLATFORM),linux)
|
|||
THREAD_LDFLAGS=-lpthread
|
||||
LDFLAGS=-ldl -lm
|
||||
|
||||
ifneq ($(USE_OPENAL_DLOPEN),1)
|
||||
LDFLAGS += -lopenal
|
||||
endif
|
||||
|
||||
ifeq ($(USE_SDL),1)
|
||||
GLLDFLAGS=$(shell sdl-config --libs)
|
||||
else
|
||||
|
@ -224,6 +235,9 @@ ifeq ($(PLATFORM),mingw32)
|
|||
|
||||
ifeq ($(USE_OPENAL),1)
|
||||
BASE_CFLAGS += -DUSE_OPENAL=1
|
||||
ifeq ($(USE_OPENAL_DLOPEN),1)
|
||||
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
|
||||
endif
|
||||
endif
|
||||
|
||||
DX_CFLAGS = -I$(DXSDK_DIR)/Include
|
||||
|
@ -247,6 +261,10 @@ ifeq ($(PLATFORM),mingw32)
|
|||
LDFLAGS= -mwindows -lwsock32 -lgdi32 -lwinmm -lole32
|
||||
GLLDFLAGS=
|
||||
|
||||
ifneq ($(USE_OPENAL_DLOPEN),1)
|
||||
LDFLAGS += -lopenal
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),x86)
|
||||
# build 32bit
|
||||
BASE_CFLAGS += -m32
|
||||
|
|
Loading…
Reference in a new issue