Skip to content

Commit

Permalink
KJSL: issue DISTRHO#693 Pulling SurgeXT plugin (arm64)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevleyski committed Aug 1, 2024
1 parent e70c122 commit f48d830
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 446 deletions.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ endif

deps:
ifeq ($(SYSDEPS),true)
$(MAKE) quickjs surge -C deps
$(MAKE) quickjs -C deps
else
$(MAKE) all -C deps
endif
Expand Down Expand Up @@ -371,10 +371,6 @@ TAR_ARGS = \
--exclude=plugins/BogaudioModules/res-src \
--exclude=plugins/Cardinal/orig \
--exclude=plugins/GrandeModular/res-src \
--exclude=plugins/surgext/surge/libs/JUCE \
--exclude=plugins/surgext/surge/resources/data/patches_3rdparty \
--exclude=plugins/surgext/surge/resources/data/patches_factory \
--exclude=plugins/surgext/surge/resources/data/wavetables_3rdparty \
--exclude=src/Rack/adapters \
--exclude=src/Rack/dep/filesystem/cmake \
--exclude=src/Rack/dep/filesystem/examples \
Expand Down
63 changes: 0 additions & 63 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -248,67 +248,6 @@ $(RACK_DEP_PATH)/lib/libquickjs.a:
install -m644 $(CURDIR)/QuickJS/libquickjs.a $@
install -m644 $(CURDIR)/QuickJS/quickjs.h $(RACK_DEP_PATH)/include/quickjs.h

# --------------------------------------------------------------
# SurgeXT target

SURGE_DEP_PATH = $(abspath surge-build)
SURGE_SRC_PATH = $(abspath ../plugins/surgext/surge)
SURGE_NAMES = HysteresisProcessing Patch SolverType Tunings Wavetable clouds ghc plaits stmlib

SURGE_CXX_FLAGS = $(filter-out -fsingle-precision-constant,$(filter-out -std=gnu++11,$(BUILD_CXX_FLAGS)))
SURGE_CXX_FLAGS += $(foreach n,$(SURGE_NAMES),-D$(n)=surgext$(n))

# fix build with gcc13
SURGE_CXX_FLAGS += -include cstdint

# fix JUCE build https://github.com/juce-framework/JUCE/issues/374
ifeq ($(CPU_I386),true)
SURGE_CXX_FLAGS += -D__sigemptyset=sigemptyset
endif

# use custom JUCE
SURGE_CXX_FLAGS += -I$(abspath ../deps/JUCE/modules)

# possibly use fftw?
# ifeq ($(shell $(PKG_CONFIG) --exists fftw3 fftw3f && echo true),true)
# SURGE_CXX_FLAGS += -DJUCE_DSP_USE_STATIC_FFTW=1
# endif

# JUCE_USE_CURL
SURGE_ENV = env \
AR=$(AR) \
CC=$(CC) \
CXX=$(CXX) \
CFLAGS='$(BUILD_C_FLAGS) -w' \
CXXFLAGS='$(SURGE_CXX_FLAGS) -w' \
LDFLAGS='$(LINK_FLAGS)'

SURGE_LIB = $(SURGE_DEP_PATH)/src/common/libsurge-common.a

$(SURGE_LIB): $(SURGE_DEP_PATH)/Makefile
+$(DEP_MAKE) -C $(SURGE_DEP_PATH) surge-common

$(SURGE_DEP_PATH)/Makefile: $(SURGE_SRC_PATH)/CMakeLists.txt
mkdir -p $(SURGE_DEP_PATH)
cd $(SURGE_DEP_PATH) && \
$(SURGE_ENV) $(CMAKE) \
-DSURGE_BUILD_32BIT_LINUX=TRUE \
-DSURGE_COMPILE_BLOCK_SIZE=8 \
-DSURGE_SKIP_AIRWINDOWS=TRUE \
-DSURGE_SKIP_JUCE_FOR_RACK=TRUE \
-DSURGE_SKIP_LUA=TRUE \
-DSURGE_SKIP_ODDSOUND_MTS=TRUE \
-DSURGE_JUCE_PATH=$(abspath ../deps/JUCE) \
-DSURGE_SIMDE_PATH=$(abspath ../src/Rack/dep/simde) \
$(SURGE_SRC_PATH)

# --------------------------------------------------------------
# Build targets

ifneq ($(NOPLUGINS),true)
TARGETS += $(SURGE_LIB)
endif

TARGETS += $(RACK_DEP_PATH)/lib/libjansson.a
TARGETS += $(RACK_DEP_PATH)/lib/libquickjs.a
TARGETS += $(RACK_DEP_PATH)/lib/libsamplerate.a
Expand Down Expand Up @@ -343,7 +282,6 @@ clean:
rm -rf $(RACK_DEP_PATH)/speexdsp/libspeexdsp/*.o
rm -rf $(RACK_DEP_PATH)/speexdsp/Makefile
rm -rf $(RACK_DEP_PATH)/zstd-1.4.5
rm -rf $(SURGE_DEP_PATH)

download: \
$(RACK_DEP_PATH)/jansson-2.12 \
Expand All @@ -352,6 +290,5 @@ download: \
$(RACK_DEP_PATH)/zstd-1.4.5/.stamp-patched

quickjs: $(RACK_DEP_PATH)/lib/libquickjs.a
surge: $(SURGE_LIB)

# --------------------------------------------------------------
151 changes: 0 additions & 151 deletions plugins/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1077,90 +1077,6 @@ PLUGIN_FILES += $(filter-out $(STOERMELDER_PACKONE_IGNORED:%=stoermelder-packone
STOERMELDER_PACKONE_CUSTOM = LongPressButton
STOERMELDER_PACKONE_CUSTOM_PER_FILE = InputLedDisplay IntermixEnvModule

# --------------------------------------------------------------
# surgext

PLUGIN_FILES += $(filter-out surgext/src/SurgeXT.cpp,$(wildcard surgext/src/*.cpp))
PLUGIN_FILES += surgext-helper/surgext-helper.cpp

# modules/types which are present in other plugins
SURGEXT_CUSTOM = HysteresisProcessing Patch SolverType Tunings Wavetable ghc clouds plaits stmlib

SURGEXT_FLAGS = $(filter-out -fsingle-precision-constant,$(filter-out -std=gnu++11,$(BUILD_CXX_FLAGS)))
SURGEXT_FLAGS += -std=gnu++17
SURGEXT_FLAGS += -DTIXML_USE_STL=1
SURGEXT_FLAGS += \
-Isurgext/libs/sst-rackhelpers/include \
-Isurgext/surge/src/common \
-Isurgext/surge/src/common/dsp \
-Isurgext/surge/src/common/dsp/filters \
-Isurgext/surge/src/common/dsp/vembertech \
-Isurgext/surge/src/common/dsp/utilities \
-Isurgext/surge/src/common/dsp/oscillators \
-Isurgext/surge/src/common/dsp/modulators \
-Isurgext/surge/src/surge-testrunner \
-Isurgext/surge/libs/fmt/include \
-Isurgext/surge/libs/LuaJitLib/LuaJIT/src \
-Isurgext/surge/libs/sst/sst-basic-blocks/include \
-Isurgext/surge/libs/sst/sst-cpputils/include \
-Isurgext/surge/libs/sst/sst-effects/include \
-Isurgext/surge/libs/sst/sst-filters/include \
-Isurgext/surge/libs/sst/sst-plugininfra/include \
-Isurgext/surge/libs/sst/sst-plugininfra/libs/tinyxml/include \
-Isurgext/surge/libs/sst/sst-plugininfra/libs/filesystem \
-Isurgext/surge/libs/sst/sst-waveshapers/include \
-Isurgext/surge/libs/strnatcmp \
-Isurgext/surge/src/headless \
-Isurgext/surge/libs/tuning-library/include \
-I../deps/surge-build/libs/sst/sst-plugininfra/libs/filesystem/include \
-DSURGE_COMPILE_BLOCK_SIZE=8 \
-DSURGE_SKIP_ODDSOUND_MTS \
-DHAS_LUA=0 \
-DHAS_JUCE=0 \
-DSKIP_JUCE=1

ifneq ($(DEBUG),true)
SURGEXT_FLAGS += -DRELEASE=1
endif

ifeq ($(MACOS),true)
SURGEXT_FLAGS += -Wno-undefined-bool-conversion -Wno-unused-variable -Wno-reorder -Wno-char-subscripts -Wno-sign-compare -Wno-ignored-qualifiers -Wno-c++17-extensions -Wno-unused-private-field
SURGEXT_FLAGS += -DMAC
else ifeq ($(WINDOWS),true)
SURGEXT_FLAGS += -Wno-suggest-override -Wno-sign-compare -Wno-ignored-qualifiers -Wno-unused-variable -Wno-char-subscripts -Wno-reorder -Wno-int-in-bool-context
SURGEXT_FLAGS += -DWINDOWS
SURGEXT_FLAGS += -DSKIP_MINGW_FORMAT
else
SURGEXT_FLAGS += -Wno-unused-value -Wno-suggest-override -Wno-implicit-fallthrough -Wno-ignored-qualifiers
SURGEXT_FLAGS += -Wno-nonnull-compare -Wno-sign-compare -Wno-char-subscripts -Wno-unused-variable -Wno-unused-but-set-variable -Wno-reorder -Wno-multichar
SURGEXT_FLAGS += -DLINUX
SURGEXT_FLAGS += -Isurge/src/linux
endif

SURGEXT_FLAGS += -DSURGE_RACK_BASE_VERSION=XT1-0-1
SURGEXT_FLAGS += -DSURGE_RACK_PLUG_VERSION=Cardinal
SURGEXT_FLAGS += -DSURGE_RACK_SURGE_VERSION=Cardinal

SURGEXT_FLAGS += -I$(abspath ../carla/source/modules)

MINIPLUGIN_FILES += surgext/src/Delay.cpp
MINIPLUGIN_FILES += surgext/src/DelayLineByFreq.cpp
MINIPLUGIN_FILES += surgext/src/DelayLineByFreqExpanded.cpp
MINIPLUGIN_FILES += surgext/src/EGxVCA.cpp
MINIPLUGIN_FILES += surgext/src/FX.cpp
MINIPLUGIN_FILES += surgext/src/LFO.cpp
MINIPLUGIN_FILES += surgext/src/Mixer.cpp
MINIPLUGIN_FILES += surgext/src/ModMatrix.cpp
MINIPLUGIN_FILES += surgext/src/QuadAD.cpp
MINIPLUGIN_FILES += surgext/src/QuadLFO.cpp
MINIPLUGIN_FILES += surgext/src/VCO.cpp
MINIPLUGIN_FILES += surgext/src/VCF.cpp
MINIPLUGIN_FILES += surgext/src/Waveshaper.cpp
MINIPLUGIN_FILES += surgext/src/XTModule.cpp
MINIPLUGIN_FILES += surgext/src/XTModuleWidget.cpp
MINIPLUGIN_FILES += surgext/src/XTStyle.cpp
MINIPLUGIN_FILES += surgext-helper/surgext-helper.cpp

# --------------------------------------------------------------
# unless_modules

Expand Down Expand Up @@ -1423,7 +1339,6 @@ endif
clean:
rm -f *.a
rm -rf $(BUILD_DIR)
rm -rf surgext/build

# --------------------------------------------------------------

Expand Down Expand Up @@ -1468,22 +1383,12 @@ RESOURCE_FILES += MindMeldModular/res/ShapeMaster/MindMeldShapes
RESOURCE_FILES += Mog/res
RESOURCE_FILES += nonlinearcircuits/res
RESOURCE_FILES += ParableInstruments/res/Neil.png
RESOURCE_FILES += surgext/build/surge-data/configuration.xml
RESOURCE_FILES += surgext/build/surge-data/fx_presets
RESOURCE_FILES += surgext/build/surge-data/wavetables
RESOURCE_FILES += surgext/build/surge-data/windows.wt
RESOURCE_FILES += $(wildcard StarlingVia/res/original.*)
RESOURCE_FILES += $(wildcard surgext/res/xt/fonts/quicksand/*.ttf)
RESOURCE_FILES += $(wildcard unless_modules/art/*.art)
RESOURCE_FILES += $(wildcard unless_modules/art/svg/*/*.svg)
RESOURCE_FILES += $(wildcard unless_modules/font/*.ttf)
# RESOURCE_FILES += $(wildcard unless_modules/manual/*)

JACK_RESOURCES = $(CURDIR)/surgext/build/surge-data/configuration.xml
JACK_RESOURCES += $(CURDIR)/surgext/build/surge-data/fx_presets
JACK_RESOURCES += $(CURDIR)/surgext/build/surge-data/wavetables
JACK_RESOURCES += $(CURDIR)/surgext/build/surge-data/windows.wt

RESOURCE_FILES += $(wildcard Cardinal/res/*.png)
RESOURCE_FILES += Cardinal/res/Miku/Miku.png

Expand All @@ -1493,7 +1398,6 @@ MINIPLUGIN_LIST += AudibleInstruments
MINIPLUGIN_LIST += BogaudioModules
MINIPLUGIN_LIST += Fundamental
MINIPLUGIN_LIST += MockbaModular
MINIPLUGIN_LIST += surgext
# MINIPLUGIN_LIST += ValleyAudio

MINIRESOURCE_FILES = AriaModules/res/components/jack-transparent.svg
Expand Down Expand Up @@ -1689,37 +1593,6 @@ MINIRESOURCE_FILES += MockbaModular/res/screw.svg
MINIRESOURCE_FILES += MockbaModular/res/selector.svg
MINIRESOURCE_FILES += MockbaModular/res/Shapah.svg

MINIRESOURCE_FILES += surgext/build/surge-data/configuration.xml
MINIRESOURCE_FILES += surgext/build/surge-data/windows.wt
MINIRESOURCE_FILES += surgext/res/xt/fonts/quicksand/Quicksand-Regular.ttf
MINIRESOURCE_FILES += surgext/res/xt/fonts/quicksand/Quicksand-Bold.ttf
MINIRESOURCE_FILES += surgext/res/xt/dark/components/fader_bg.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/fader_bg_25.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/fader_handle.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-9.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-12.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-14.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-16.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-9.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-12.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-14.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-16.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/mod-button.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/components/port.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/panels/fx/BlankNoDisplay.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/EGLFO.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/Matrix.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/Mixer.svg
MINIRESOURCE_FILES += surgext/res/xt/dark/panels/vco/BlankVCO.svg
MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_0.svg
MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_1.svg
MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_2.svg
MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_3.svg
MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_4.svg
MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_5.svg
MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_6.svg
MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_7.svg

# MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelDark.svg
# MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelDark.svg
# MINIRESOURCE_FILES += ValleyAudio/res/LightLEDButton80.svg
Expand Down Expand Up @@ -2008,23 +1881,6 @@ else
$(SILENT)ln -sf $(abspath $<) $@
endif

%/surgext/build/surge-data/configuration.xml: surgext/surge/resources/surge-shared/configuration.xml
-@mkdir -p "$(shell dirname $@)"
$(SILENT)ln -sf $(abspath $<) $@

%/surgext/build/surge-data/fx_presets:
-@mkdir -p "$@"
cp -R surgext/surge/resources/data/fx_presets/* $@/
cp -R surgext/res/surge_extra_data/fx_presets/* $@/

%/surgext/build/surge-data/wavetables: surgext/surge/resources/data/wavetables
-@mkdir -p "$(shell dirname $@)"
$(SILENT)ln -sf $(abspath $<) $@

%/surgext/build/surge-data/windows.wt: surgext/surge/resources/surge-shared/windows.wt
-@mkdir -p "$(shell dirname $@)"
$(SILENT)ln -sf $(abspath $<) $@

# --------------------------------------------------------------
# Build commands

Expand Down Expand Up @@ -2763,13 +2619,6 @@ $(BUILD_DIR)/stocaudio/%.cpp.o: stocaudio/%.cpp
$(foreach m,$(STOCAUDIO_CUSTOM),$(call custom_module_names,$(m),stocaudio)) \
-DpluginInstance=pluginInstance__stocaudio

$(BUILD_DIR)/surgext%.cpp.o: surgext%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(SURGEXT_FLAGS) -c -o $@ \
$(foreach m,$(SURGEXT_CUSTOM),$(call custom_module_names,$(m),surgext)) \
-DpluginInstance=pluginInstance__surgext

$(BUILD_DIR)/unless_modules/%.cpp.o: unless_modules/%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"
Expand Down
Loading

0 comments on commit f48d830

Please sign in to comment.