Makefile stuff.

This commit is contained in:
Themaister 2010-08-25 22:40:43 +02:00
parent 6067946fd5
commit fbd8dc6314
5 changed files with 11 additions and 2 deletions

View File

@ -20,6 +20,10 @@ ifeq ($(BUILD_ROAR), 1)
OBJ += roar.o OBJ += roar.o
LIBS += -lroar LIBS += -lroar
endif endif
ifeq ($(BUILD_AL), 1)
OBJ += openal.o
LIBS += -lopenal
endif
ifeq ($(BUILD_OPENGL), 1) ifeq ($(BUILD_OPENGL), 1)
OBJ += gl.o OBJ += gl.o

View File

@ -36,11 +36,12 @@
#define AUDIO_OSS 2 #define AUDIO_OSS 2
#define AUDIO_ALSA 3 #define AUDIO_ALSA 3
#define AUDIO_ROAR 4 #define AUDIO_ROAR 4
#define AUDIO_AL 5
//////////////////////// ////////////////////////
// Chooses which video and audio subsystem to use. Remember to update config.mk if you change these. // Chooses which video and audio subsystem to use. Remember to update config.mk if you change these.
#define VIDEO_DRIVER VIDEO_GL #define VIDEO_DRIVER VIDEO_GL
#define AUDIO_DRIVER AUDIO_ALSA #define AUDIO_DRIVER AUDIO_AL
//////////////// ////////////////

View File

@ -4,8 +4,9 @@ BUILD_FILTER = 0
BUILD_RSOUND = 0 BUILD_RSOUND = 0
BUILD_OSS = 0 BUILD_OSS = 0
BUILD_ALSA = 1 BUILD_ALSA = 0
BUILD_ROAR = 0 BUILD_ROAR = 0
BUILD_AL = 1
PREFIX = /usr/local PREFIX = /usr/local

View File

@ -19,6 +19,7 @@
#include "driver.h" #include "driver.h"
#include <AL/al.h> #include <AL/al.h>
#include <AL/alc.h> #include <AL/alc.h>
#include <sys/time.h>
#define BUFSIZE 128 #define BUFSIZE 128

View File

@ -57,6 +57,8 @@ static driver_t driver = {
.audio = &audio_alsa, .audio = &audio_alsa,
#elif AUDIO_DRIVER == AUDIO_ROAR #elif AUDIO_DRIVER == AUDIO_ROAR
.audio = &audio_roar, .audio = &audio_roar,
#elif AUDIO_DRIVER == AUDIO_AL
.audio = &audio_openal,
#else #else
#error "Define a valid audio driver in config.h" #error "Define a valid audio driver in config.h"
#endif #endif