Update makefiles

This commit is contained in:
Jean Pierre Cimalando 2020-10-07 17:11:59 +02:00
parent d5aad58366
commit c6090d44fc
2 changed files with 9 additions and 2 deletions

View file

@ -4,6 +4,10 @@ ifndef SFIZZ_DIR
$(error sfizz: The source directory must be set before including) $(error sfizz: The source directory must be set before including)
endif endif
### Options
SFIZZ_USE_SNDFILE ?= 1
### ###
SFIZZ_MACHINE := $(shell $(CC) -dumpmachine) SFIZZ_MACHINE := $(shell $(CC) -dumpmachine)
@ -125,13 +129,15 @@ SFIZZ_PKG_CONFIG ?= pkg-config
# Sndfile dependency # Sndfile dependency
ifeq ($(SFIZZ_USE_SNDFILE),1)
SFIZZ_SNDFILE_C_FLAGS ?= $(shell $(SFIZZ_PKG_CONFIG) --cflags sndfile) SFIZZ_SNDFILE_C_FLAGS ?= $(shell $(SFIZZ_PKG_CONFIG) --cflags sndfile)
SFIZZ_SNDFILE_CXX_FLAGS ?= $(SFIZZ_SNDFILE_C_FLAGS) SFIZZ_SNDFILE_CXX_FLAGS ?= $(SFIZZ_SNDFILE_C_FLAGS)
SFIZZ_SNDFILE_LINK_FLAGS ?= $(shell $(SFIZZ_PKG_CONFIG) --libs sndfile) SFIZZ_SNDFILE_LINK_FLAGS ?= $(shell $(SFIZZ_PKG_CONFIG) --libs sndfile)
SFIZZ_C_FLAGS += $(SFIZZ_SNDFILE_C_FLAGS) SFIZZ_C_FLAGS += $(SFIZZ_SNDFILE_C_FLAGS) -DST_AUDIO_FILE_USE_SNDFILE=1
SFIZZ_CXX_FLAGS += $(SFIZZ_SNDFILE_CXX_FLAGS) SFIZZ_CXX_FLAGS += $(SFIZZ_SNDFILE_CXX_FLAGS) -DST_AUDIO_FILE_USE_SNDFILE=1
SFIZZ_LINK_FLAGS += $(SFIZZ_SNDFILE_LINK_FLAGS) SFIZZ_LINK_FLAGS += $(SFIZZ_SNDFILE_LINK_FLAGS)
endif
### Abseil dependency ### Abseil dependency

View file

@ -29,6 +29,7 @@
# #
# SFIZZ_RACK_PLUGIN_DIR = <the root directory of the Rack plugin> # SFIZZ_RACK_PLUGIN_DIR = <the root directory of the Rack plugin>
# SFIZZ_PKG_CONFIG = <a custom pkg-config command> # SFIZZ_PKG_CONFIG = <a custom pkg-config command>
# SFIZZ_USE_SNDFILE = <0 disabled, 1 enabled (default)>
# SFIZZ_SNDFILE_C_FLAGS = <compiler flags of sndfile for C> # SFIZZ_SNDFILE_C_FLAGS = <compiler flags of sndfile for C>
# SFIZZ_SNDFILE_CXX_FLAGS = <compiler flags of sndfile for C++> # SFIZZ_SNDFILE_CXX_FLAGS = <compiler flags of sndfile for C++>
# SFIZZ_SNDFILE_LINK_FLAGS = <linker flags of sndfile> # SFIZZ_SNDFILE_LINK_FLAGS = <linker flags of sndfile>