Skip to content

Commit

Permalink
Update makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcima committed Oct 28, 2020
1 parent d5aad58 commit c6090d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ ifndef SFIZZ_DIR
$(error sfizz: The source directory must be set before including)
endif

### Options

SFIZZ_USE_SNDFILE ?= 1

###

SFIZZ_MACHINE := $(shell $(CC) -dumpmachine)
Expand Down Expand Up @@ -125,13 +129,15 @@ SFIZZ_PKG_CONFIG ?= pkg-config

# Sndfile dependency

ifeq ($(SFIZZ_USE_SNDFILE),1)
SFIZZ_SNDFILE_C_FLAGS ?= $(shell $(SFIZZ_PKG_CONFIG) --cflags sndfile)
SFIZZ_SNDFILE_CXX_FLAGS ?= $(SFIZZ_SNDFILE_C_FLAGS)
SFIZZ_SNDFILE_LINK_FLAGS ?= $(shell $(SFIZZ_PKG_CONFIG) --libs sndfile)

SFIZZ_C_FLAGS += $(SFIZZ_SNDFILE_C_FLAGS)
SFIZZ_CXX_FLAGS += $(SFIZZ_SNDFILE_CXX_FLAGS)
SFIZZ_C_FLAGS += $(SFIZZ_SNDFILE_C_FLAGS) -DST_AUDIO_FILE_USE_SNDFILE=1
SFIZZ_CXX_FLAGS += $(SFIZZ_SNDFILE_CXX_FLAGS) -DST_AUDIO_FILE_USE_SNDFILE=1
SFIZZ_LINK_FLAGS += $(SFIZZ_SNDFILE_LINK_FLAGS)
endif

### Abseil dependency

Expand Down
1 change: 1 addition & 0 deletions rack.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#
# SFIZZ_RACK_PLUGIN_DIR = <the root directory of the Rack plugin>
# 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_CXX_FLAGS = <compiler flags of sndfile for C++>
# SFIZZ_SNDFILE_LINK_FLAGS = <linker flags of sndfile>
Expand Down

0 comments on commit c6090d4

Please sign in to comment.