diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 49 |
1 files changed, 28 insertions, 21 deletions
@@ -168,6 +168,10 @@ ifndef USE_INTERNAL_SPEEX USE_INTERNAL_SPEEX=1 endif +ifndef USE_INTERNAL_OGG +USE_INTERNAL_OGG=1 +endif + ifndef USE_INTERNAL_OPUS USE_INTERNAL_OPUS=1 endif @@ -219,6 +223,7 @@ NDIR=$(MOUNT_DIR)/null UIDIR=$(MOUNT_DIR)/ui JPDIR=$(MOUNT_DIR)/jpeg-8c SPEEXDIR=$(MOUNT_DIR)/libspeex +OGGDIR=$(MOUNT_DIR)/libogg-1.3.0 OPUSDIR=$(MOUNT_DIR)/opus-1.0.2 OPUSFILEDIR=$(MOUNT_DIR)/opusfile-0.2 ZDIR=$(MOUNT_DIR)/zlib @@ -359,10 +364,6 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu")) endif endif - ifeq ($(USE_CODEC_VORBIS),1) - CLIENT_LIBS += -lvorbisfile -lvorbis -logg - endif - ifeq ($(USE_MUMBLE),1) CLIENT_LIBS += -lrt endif @@ -429,10 +430,6 @@ ifeq ($(PLATFORM),darwin) BASE_CFLAGS += $(FREETYPE_CFLAGS) endif - ifeq ($(USE_CODEC_VORBIS),1) - CLIENT_LIBS += -lvorbisfile -lvorbis -logg - endif - BASE_CFLAGS += -D_THREAD_SAFE=1 ifeq ($(USE_LOCAL_HEADERS),1) @@ -538,10 +535,6 @@ ifeq ($(PLATFORM),mingw32) endif endif - ifeq ($(USE_CODEC_VORBIS),1) - CLIENT_LIBS += -lvorbisfile -lvorbis -logg - endif - ifeq ($(ARCH),x86) # build 32bit BASE_CFLAGS += -m32 @@ -619,10 +612,6 @@ ifeq ($(PLATFORM),freebsd) endif endif - ifeq ($(USE_CODEC_VORBIS),1) - CLIENT_LIBS += -lvorbisfile -lvorbis -logg - endif - # cross-compiling tweaks ifeq ($(ARCH),x86) ifeq ($(CROSS_COMPILING),1) @@ -675,10 +664,6 @@ ifeq ($(PLATFORM),openbsd) endif endif - ifeq ($(USE_CODEC_VORBIS),1) - CLIENT_LIBS += -lvorbisfile -lvorbis -logg - endif - ifeq ($(USE_CURL),1) ifneq ($(USE_CURL_DLOPEN),1) CLIENT_LIBS += -lcurl @@ -888,6 +873,8 @@ endif ifeq ($(USE_CODEC_VORBIS),1) CLIENT_CFLAGS += -DUSE_CODEC_VORBIS + CLIENT_LIBS += -lvorbisfile -lvorbis + NEED_OGG=1 endif ifeq ($(USE_CODEC_OPUS),1) @@ -899,7 +886,16 @@ ifeq ($(USE_CODEC_OPUS),1) CLIENT_CFLAGS += -I$(OPUSFILEDIR)/include else - CLIENT_LIBS += -lopusfile -lopus -logg + CLIENT_LIBS += -lopusfile -lopus + endif + NEED_OGG=1 +endif + +ifeq ($(NEED_OGG),1) + ifeq ($(USE_INTERNAL_OGG),1) + CLIENT_CFLAGS += -I$(OGGDIR)/include + else + CLIENT_LIBS += -logg endif endif @@ -1767,6 +1763,14 @@ Q3OBJ += \ endif endif +ifeq ($(NEED_OGG),1) +ifeq ($(USE_INTERNAL_OGG),1) +Q3OBJ += \ + $(B)/client/bitwise.o \ + $(B)/client/framing.o +endif +endif + ifeq ($(USE_INTERNAL_ZLIB),1) Q3OBJ += \ $(B)/client/adler32.o \ @@ -2178,6 +2182,9 @@ $(B)/client/%.o: $(CMDIR)/%.c $(B)/client/%.o: $(SPEEXDIR)/%.c $(DO_CC) +$(B)/client/%.o: $(OGGDIR)/src/%.c + $(DO_CC) + $(B)/client/opus/%.o: $(OPUSDIR)/src/%.c $(DO_CC) |