Skip to content

Commit

Permalink
Fix up vorbis handling in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
zturtleman committed Jul 20, 2014
1 parent efa9555 commit b02b548
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ USE_INTERNAL_OGG=$(USE_INTERNAL_LIBS)
endif

ifndef USE_INTERNAL_VORBIS
USE_INTERNAL_VORBIS=1
USE_INTERNAL_VORBIS=$(USE_INTERNAL_LIBS)
endif

ifndef USE_INTERNAL_OPUS
Expand Down Expand Up @@ -982,14 +982,6 @@ ifeq ($(USE_CURL),1)
endif
endif

ifeq ($(USE_CODEC_VORBIS),1)
VORBIS_CFLAGS ?= $(shell pkg-config --silence-errors --cflags vorbisfile vorbis || true)
VORBIS_LIBS ?= $(shell pkg-config --silence-errors --libs vorbisfile vorbis || echo -lvorbisfile -lvorbis)
CLIENT_CFLAGS += -DUSE_CODEC_VORBIS $(VORBIS_CFLAGS)
CLIENT_LIBS += $(VORBIS_LIBS)
NEED_OGG=1
endif

ifeq ($(USE_CODEC_OPUS),1)
CLIENT_CFLAGS += -DUSE_CODEC_OPUS
ifeq ($(USE_INTERNAL_OPUS),1)
Expand All @@ -1005,6 +997,19 @@ ifeq ($(USE_CODEC_OPUS),1)
NEED_OGG=1
endif

ifeq ($(USE_CODEC_VORBIS),1)
CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
ifeq ($(USE_INTERNAL_VORBIS),1)
CLIENT_CFLAGS += -I$(VORBISDIR)/include -I$(VORBISDIR)/lib
else
VORBIS_CFLAGS ?= $(shell pkg-config --silence-errors --cflags vorbisfile vorbis || true)
VORBIS_LIBS ?= $(shell pkg-config --silence-errors --libs vorbisfile vorbis || echo -lvorbisfile -lvorbis)
endif
CLIENT_CFLAGS += $(VORBIS_CFLAGS)
CLIENT_LIBS += $(VORBIS_LIBS)
NEED_OGG=1
endif

ifeq ($(NEED_OGG),1)
ifeq ($(USE_INTERNAL_OGG),1)
OGG_CFLAGS = -I$(OGGDIR)/include
Expand All @@ -1016,15 +1021,6 @@ ifeq ($(NEED_OGG),1)
CLIENT_LIBS += $(OGG_LIBS)
endif

ifeq ($(USE_CODEC_VORBIS),1)
ifeq ($(USE_INTERNAL_VORBIS),1)
CLIENT_CFLAGS += -I$(VORBISDIR)/include -I$(VORBISDIR)/lib

else
CLIENT_LIBS += -lvorbisfile -lvorbis
endif
endif

ifeq ($(USE_RENDERER_DLOPEN),1)
CLIENT_CFLAGS += -DUSE_RENDERER_DLOPEN
endif
Expand Down

0 comments on commit b02b548

Please sign in to comment.