More build fixes, ensure no duplicated widget names

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2021-10-17 14:58:20 +01:00
parent c49b4b9164
commit f9c1241b38
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
2 changed files with 29 additions and 34 deletions

59
deps/Makefile vendored
View file

@ -33,9 +33,6 @@ ifneq ($(MACOS_OR_WINDOWS),true)
MACHINE_SUFFIX = -linux
endif
# NOTE speex fails to build when neon is enabled
CONFIGURE = ./configure --prefix="$(DEP_PATH)" --host=$(TARGET_MACHINE) --enable-neon=no
# --------------------------------------------------------------
# Fix up cmake
@ -44,6 +41,11 @@ SPACE +=
CMAKE = cmake
CMAKE += -DCMAKE_INSTALL_LIBDIR=lib
CMAKE += -DCMAKE_INSTALL_PREFIX='$(DEP_PATH)'
CMAKE += -DBUILD_SHARED_LIBS=OFF
# make sure macOS target matches ours
ifneq (,$(findstring -arch$(SPACE),$(CXXFLAGS)))
CMAKE += -DCMAKE_OSX_ARCHITECTURES='$(subst $(SPACE),;,$(subst -arch=,,$(filter -arch=%,$(subst -arch$(SPACE),-arch=,$(CXXFLAGS)))))'
endif
@ -51,19 +53,34 @@ ifneq (,$(findstring -mmacosx-version-min=,$(CXXFLAGS)))
CMAKE += -DCMAKE_OSX_DEPLOYMENT_TARGET=$(subst -mmacosx-version-min=,,$(filter -mmacosx-version-min=%,$(CXXFLAGS)))
endif
ifeq ($(WINDOWS),true)
CMAKE += -G 'Unix Makefiles'
CMAKE += -DCMAKE_RC_COMPILER=$(subst gcc,windres,$(CC))
CMAKE += -DCMAKE_SYSTEM_NAME=Windows
endif
# make sure debug/release matches
ifeq ($(DEBUG),true)
CMAKE += -DCMAKE_BUILD_TYPE=Debug
else
CMAKE += -DCMAKE_BUILD_TYPE=Release
endif
CMAKE += -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX='$(DEP_PATH)'
# fix cross-compilation for windows
ifeq ($(WINDOWS),true)
CMAKE += -G 'Unix Makefiles'
CMAKE += -DCMAKE_RC_COMPILER=$(subst gcc,windres,$(CC))
CMAKE += -DCMAKE_SYSTEM_NAME=Windows
endif
# --------------------------------------------------------------
# Fix up configure
CONFIGURE = ./configure
CONFIGURE += --prefix="$(DEP_PATH)"
CONFIGURE += --host=$(TARGET_MACHINE)
CONFIGURE += --enable-static
CONFIGURE += --disable-shared
# NOTE libsamplerate wants to link against alsa, so we disable that
CONFIGURE += --disable-alsa
# NOTE speex fails to build when neon is enabled, so we disable that
CONFIGURE += --disable-neon
# NOTE libsamplerate fails with invalid host, so we force ac_cv_host
CONFIGURE += ac_cv_host=$(TARGET_MACHINE)
# --------------------------------------------------------------
# VCV internal dependencies target
@ -95,28 +112,6 @@ $(DEP_PATH)/zstd-1.4.5/.stamp-patched:
touch $@
endif
# libsamplerate fails to link its tests in some systems
$(DEP_PATH)/libsamplerate-0.1.9:
$(MAKE) -C $(DEP_PATH) libsamplerate-0.1.9
$(DEP_PATH)/lib/libsamplerate.a: $(DEP_PATH)/libsamplerate-0.1.9
cd $(DEP_PATH)/libsamplerate-0.1.9 && $(CONFIGURE) --disable-fftw --disable-sndfile
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/termination_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/simple_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/misc_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/callback_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/reset_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/varispeed_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/float_short_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/multi_channel_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/callback_hang_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/src-evaluate
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/throughput_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/multichan_throughput_test
touch $(DEP_PATH)/libsamplerate-0.1.9/tests/downsample_test
$(MAKE) -C $(DEP_PATH)/libsamplerate-0.1.9
$(MAKE) -C $(DEP_PATH)/libsamplerate-0.1.9 install
# --------------------------------------------------------------
# Build targets

View file

@ -235,7 +235,7 @@ clean:
# Build commands
# function for custom module names macro
custom_module_name = -Dmodel${1}=model${2}${1}
custom_module_names = -Dmodel${1}=model${2}${1} -D${1}Widget=${2}${1}Widget
$(TARGET): $(PLUGIN_OBJS)
@echo "Creating $@"
@ -275,7 +275,7 @@ $(BUILD_DIR)/Befaco/%.cpp.o: Befaco/%.cpp
$(BUILD_DIR)/BogaudioModules/%.cpp.o: BogaudioModules/%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DpluginInstance=pluginInstance__BogaudioModules $(foreach m,$(BOGAUDIO_CUSTOM),$(call custom_module_name,$(m),Bogaudio)) -DRACK_SIMD=1 -IBogaudioModules/lib -IBogaudioModules/src/dsp -c -o $@
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DpluginInstance=pluginInstance__BogaudioModules $(foreach m,$(BOGAUDIO_CUSTOM),$(call custom_module_names,$(m),Bogaudio)) -DRACK_SIMD=1 -IBogaudioModules/lib -IBogaudioModules/src/dsp -c -o $@
$(BUILD_DIR)/Fundamental/%.cpp.o: Fundamental/%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"