summaryrefslogtreecommitdiff
path: root/src/unix/Makefile
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-01-09 02:16:46 +0000
committerTim Angus <tim@ngus.net>2006-01-09 02:16:46 +0000
commit7d96b51fbc8b0df8ebf348de2aa5f2058254ed93 (patch)
tree1b13c58efb4f469e4cae5f000bc7e2d2e4b680fc /src/unix/Makefile
parentdc6118816aa49c9b1e6dd82e6c6504f2153c37df (diff)
* Merged ioq3-468
Diffstat (limited to 'src/unix/Makefile')
-rw-r--r--src/unix/Makefile40
1 files changed, 31 insertions, 9 deletions
diff --git a/src/unix/Makefile b/src/unix/Makefile
index 4769b075..29301edb 100644
--- a/src/unix/Makefile
+++ b/src/unix/Makefile
@@ -92,6 +92,10 @@ ifndef USE_OPENAL_DLOPEN
USE_OPENAL_DLOPEN=0
endif
+ifndef USE_CODEC_VORBIS
+USE_CODEC_VORBIS=0
+endif
+
ifndef USE_LOCAL_HEADERS
USE_LOCAL_HEADERS=1
endif
@@ -158,6 +162,10 @@ ifeq ($(PLATFORM),linux)
endif
endif
+ ifeq ($(USE_CODEC_VORBIS),1)
+ BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
+ endif
+
ifeq ($(USE_SDL),1)
BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 $(shell sdl-config --cflags)
GL_CFLAGS =
@@ -216,6 +224,10 @@ ifeq ($(PLATFORM),linux)
endif
endif
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
+ endif
+
ifeq ($(ARCH),i386)
# linux32 make ...
BASE_CFLAGS += -m32
@@ -247,6 +259,10 @@ ifeq ($(PLATFORM),darwin)
endif
endif
+ ifeq ($(USE_CODEC_VORBIS),1)
+ BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
+ endif
+
ifeq ($(USE_SDL),1)
BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 -D_THREAD_SAFE=1 -I../SDL12/include
GL_CFLAGS =
@@ -303,6 +319,10 @@ ifeq ($(PLATFORM),darwin)
endif
endif
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
+ endif
+
else # ifeq darwin
@@ -323,6 +343,10 @@ ifeq ($(PLATFORM),mingw32)
BASE_CFLAGS += -DUSE_OPENAL=1 -DUSE_OPENAL_DLOPEN=1
endif
+ ifeq ($(USE_CODEC_VORBIS),1)
+ BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
+ endif
+
GL_CFLAGS =
MINGW_CFLAGS = -DDONT_TYPEDEF_INT32
@@ -342,6 +366,10 @@ ifeq ($(PLATFORM),mingw32)
LDFLAGS= -mwindows -lwsock32 -lgdi32 -lwinmm -lole32
CLIENT_LDFLAGS=
+ ifeq ($(USE_CODEC_VORBIS),1)
+ CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
+ endif
+
ifeq ($(ARCH),x86)
# build 32bit
BASE_CFLAGS += -m32
@@ -701,6 +729,7 @@ Q3OBJ = \
$(B)/client/snd_main.o \
$(B)/client/snd_codec.o \
$(B)/client/snd_codec_wav.o \
+ $(B)/client/snd_codec_ogg.o \
\
$(B)/client/qal.o \
$(B)/client/snd_openal.o \
@@ -828,13 +857,6 @@ ifeq ($(ARCH),x86)
endif
ifeq ($(ARCH),x86_64)
Q3OBJ += $(B)/client/vm_x86_64.o
-
- #FIXME: why do these need to be here?
- Q3OBJ += \
- $(B)/client/snd_mixa.o \
- $(B)/client/matha.o \
- $(B)/client/ftola.o \
- $(B)/client/snapvectora.o
endif
ifeq ($(ARCH),ppc)
@@ -920,6 +942,7 @@ $(B)/client/snd_wavelet.o : $(CDIR)/snd_wavelet.c; $(DO_CC)
$(B)/client/snd_main.o : $(CDIR)/snd_main.c; $(DO_CC)
$(B)/client/snd_codec.o : $(CDIR)/snd_codec.c; $(DO_CC)
$(B)/client/snd_codec_wav.o : $(CDIR)/snd_codec_wav.c; $(DO_CC)
+$(B)/client/snd_codec_ogg.o : $(CDIR)/snd_codec_ogg.c; $(DO_CC)
$(B)/client/qal.o : $(CDIR)/qal.c; $(DO_CC)
$(B)/client/snd_openal.o : $(CDIR)/snd_openal.c; $(DO_CC)
@@ -1454,8 +1477,7 @@ installer: build_release
D_FILES=$(shell find . -name '*.d')
$(B)/base/vm/vm.d: $(GOBJ) $(CGOBJ) $(UIOBJ)
- -rm -f $@
- find $(B)/base -iname '*.d' | xargs sed -e 's/\.o/\.asm/g' > $@
+ cat $(^:%.o=%.d) | sed -e 's/\.o/\.asm/g' > $@
qvmdeps: $(B)/base/vm/vm.d