Add option to build against shared libvorbis (tremor by default).

This commit is contained in:
Sérgio Benjamim 2017-04-20 00:40:42 -03:00
parent bb6fa78347
commit 345402774e
2 changed files with 19 additions and 6 deletions

View File

@ -248,6 +248,9 @@ else
endif
LDFLAGS += $(LIBM)
ifeq ($(SHARED_LIBVORBIS), 1)
LDFLAGS += -lvorbisfile
endif
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g
@ -261,8 +264,10 @@ endif
CORE_DIR := .
TREMOR_SRC_DIR := $(CORE_DIR)/core/tremor
LIBRETRO_DIR := $(CORE_DIR)/libretro
ifeq ($(SHARED_LIBVORBIS),)
TREMOR_SRC_DIR := $(CORE_DIR)/core/tremor
endif
LIBRETRO_DIR := $(CORE_DIR)/libretro
include $(LIBRETRO_DIR)/Makefile.common
@ -272,7 +277,11 @@ ifeq ($(LOGSOUND), 1)
LIBRETRO_CFLAGS := -DLOGSOUND
endif
DEFINES := -DUSE_LIBTREMOR
ifeq ($(SHARED_LIBVORBIS), 1)
DEFINES := -DUSE_LIBVORBIS
else
DEFINES := -DUSE_LIBTREMOR
endif
CFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES)
ifeq ($(FRONTEND_SUPPORTS_RGB565), 1)

View File

@ -8,9 +8,13 @@ GENPLUS_SRC_DIR := $(CORE_DIR)/core \
$(CORE_DIR)/core/cart_hw \
$(CORE_DIR)/core/cart_hw/svp
SOURCES_C = $(foreach dir,$(GENPLUS_SRC_DIR),$(wildcard $(dir)/*.c)) \
$(foreach dir,$(TREMOR_SRC_DIR),$(wildcard $(dir)/*.c)) \
$(LIBRETRO_DIR)/libretro.c
SOURCES_C = $(foreach dir,$(GENPLUS_SRC_DIR),$(wildcard $(dir)/*.c))
ifeq ($(SHARED_LIBVORBIS),)
SOURCES_C += $(foreach dir,$(TREMOR_SRC_DIR),$(wildcard $(dir)/*.c))
endif
SOURCES_C += $(LIBRETRO_DIR)/libretro.c
SOURCES_C += $(LIBRETRO_DIR)/scrc32.c