aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authornotaz2012-07-30 21:29:29 +0300
committernotaz2012-07-31 01:31:34 +0300
commit07c13dfd11cbd45e96a5c21cd88ccd44601678ea (patch)
tree8d9713246288c00ff5edb6e6301d710ed36bfa10 /Makefile
parentf05d6ca255c80170e4e5fc61cc48d87e013b8807 (diff)
downloadpcsx_rearmed-07c13dfd11cbd45e96a5c21cd88ccd44601678ea.tar.gz
pcsx_rearmed-07c13dfd11cbd45e96a5c21cd88ccd44601678ea.tar.bz2
pcsx_rearmed-07c13dfd11cbd45e96a5c21cd88ccd44601678ea.zip
allow multiple sound drivers to be compiled
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 16 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 5720bab..8b7d83c 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
# default stuff goes here, so that config can override
TARGET = pcsx
CFLAGS += -Wall -ggdb -Ifrontend -ffast-math
-LDLIBS += -lpthread -ldl -lpng -lz -lm
+LDLIBS += -lpthread -lm
ifndef DEBUG
CFLAGS += -O2 -DNDEBUG
endif
@@ -26,6 +26,7 @@ endif
-include Makefile.local
CC_LINK = $(CC)
+LDLIBS += $(MAIN_LDLIBS)
# core
OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/debug.o \
@@ -64,26 +65,32 @@ endif
# spu
OBJS += plugins/dfsound/dma.o plugins/dfsound/freeze.o \
- plugins/dfsound/registers.o plugins/dfsound/spu.o
+ plugins/dfsound/registers.o plugins/dfsound/spu.o \
+ plugins/dfsound/out.o plugins/dfsound/nullsnd.o
plugins/dfsound/spu.o: plugins/dfsound/adsr.c plugins/dfsound/reverb.c \
plugins/dfsound/xa.c
ifeq "$(ARCH)" "arm"
OBJS += plugins/dfsound/arm_utils.o
endif
-ifeq "$(SOUND_DRIVER)" "oss"
-plugins/dfsound/%.o: CFLAGS += -DUSEOSS
+ifneq ($(findstring oss,$(SOUND_DRIVERS)),)
+plugins/dfsound/out.o: CFLAGS += -DHAVE_OSS
OBJS += plugins/dfsound/oss.o
endif
-ifeq "$(SOUND_DRIVER)" "alsa"
-plugins/dfsound/%.o: CFLAGS += -DUSEALSA
+ifneq ($(findstring alsa,$(SOUND_DRIVERS)),)
+plugins/dfsound/out.o: CFLAGS += -DHAVE_ALSA
OBJS += plugins/dfsound/alsa.o
LDLIBS += -lasound
endif
-ifeq "$(SOUND_DRIVER)" "sdl"
+ifneq ($(findstring sdl,$(SOUND_DRIVERS)),)
+plugins/dfsound/out.o: CFLAGS += -DHAVE_SDL
OBJS += plugins/dfsound/sdl.o
endif
-ifeq "$(SOUND_DRIVER)" "none"
-OBJS += plugins/dfsound/nullsnd.o
+ifneq ($(findstring pulseaudio,$(SOUND_DRIVERS)),)
+plugins/dfsound/out.o: CFLAGS += -DHAVE_PULSE
+OBJS += plugins/dfsound/pulseaudio.o
+endif
+ifneq ($(findstring libretro,$(SOUND_DRIVERS)),)
+plugins/dfsound/out.o: CFLAGS += -DHAVE_LIBRETRO
endif
# builtin gpu