Tweak wasm things a bit more, download some pregen files for now

This commit is contained in:
falkTX 2022-07-15 19:04:40 +01:00
parent ee96a86e24
commit e840ca05da
5 changed files with 1242 additions and 14 deletions

View file

@ -197,7 +197,7 @@ endif
# --------------------------------------------------------------
# Individual targets
cardinal: carla deps dgl plugins
cardinal: carla deps dgl plugins resources
$(MAKE) all -C src $(CARLA_EXTRA_ARGS)
carla:
@ -227,7 +227,7 @@ endif
plugins: deps
$(MAKE) all -C plugins
resources: cardinal
resources:
$(MAKE) resources -C plugins
ifneq ($(CROSS_COMPILING),true)

13
deps/Makefile vendored
View file

@ -106,7 +106,12 @@ ENV += LDFLAGS='$(LINK_FLAGS)'
SPACE =
SPACE +=
CMAKE = cmake
ifeq ($(WASM),true)
CMAKE = emcmake cmake
else
CMAKE = cmake
endif
CMAKE += -DCMAKE_INSTALL_LIBDIR=lib
CMAKE += -DCMAKE_INSTALL_PREFIX='$(DEP_PATH)'
CMAKE += -DBUILD_SHARED_LIBS=OFF
@ -126,6 +131,10 @@ $(error CI build requires -mmacosx-version-min flag on macOS)
endif
endif
ifeq ($(CROSS_COMPILING),true)
CMAKE += -DCMAKE_CROSSCOMPILING=ON
endif
# make sure debug/release matches
ifeq ($(DEBUG),true)
CMAKE += -DCMAKE_BUILD_TYPE=Debug
@ -171,7 +180,7 @@ DEP_MAKE += DEP_MAC_SDK_FLAGS=
DEP_MAKE += MACHINE=$(MACHINE)$(MACHINE_SUFFIX)
DEP_MAKE += VERBOSE=1
ifeq ($(MACOS),true)
ifeq ($(shell uname -s),Darwin)
ifeq ($(CIBUILD),true)
DEP_MAKE += SHA256SUM="shasum5.28 -a 256"
else

2
dpf

@ -1 +1 @@
Subproject commit 41da9887ed1a38f680202909f3fd36a18dd91df7
Subproject commit 0c0a4e401c2a552145720904b916da21846c8fc1

View file

@ -129,6 +129,10 @@ EXTRA_LIBS += ../../deps/aubio/libaubio.a
EXTRA_LIBS += $(shell $(PKG_CONFIG) --libs fftw3f)
endif
ifeq ($(WASM),true)
EXTRA_DEPENDENCIES += wasm_resources
endif
# --------------------------------------------------------------
# Do some magic
@ -211,8 +215,8 @@ BASE_FLAGS += -Wno-unused-variable
# extra linker flags
ifeq ($(WASM),true)
# LINK_FLAGS += --preload-file=./jsfx
# LINK_FLAGS += --preload-file=./lv2
LINK_FLAGS += --preload-file=./jsfx
LINK_FLAGS += --preload-file=./lv2
LINK_FLAGS += --preload-file=./resources
LINK_FLAGS += -sALLOW_MEMORY_GROWTH
LINK_FLAGS += -sINITIAL_MEMORY=64Mb
@ -321,11 +325,6 @@ ifeq ($(CARDINAL_VARIANT),main)
jack: BUILD_CXX_FLAGS += -DDPF_JACK_STANDALONE_SKIP_RTAUDIO_FALLBACK -DDPF_JACK_STANDALONE_SKIP_SDL2_FALLBACK
endif
# Prepare resources for wasm
ifeq ($(WASM),main)
jack: wasm_resources
endif
# Cardinal main variant is not available as VST2 due to lack of CV ports
ifneq ($(CARDINAL_VARIANT),main)
ifeq ($(MACOS),true)
@ -342,8 +341,13 @@ vst3: $(VST3_RESOURCES)
# --------------------------------------------------------------
# Extra rules for wasm resources
wasm_resources: $(LV2_RESOURCES)
cp -rL $(TARGET_DIR)/$(NAME).lv2/resources .
wasm_resources: $(CURDIR)/lv2 $(CURDIR)/resources
$(CURDIR)/lv2: $(LV2_RESOURCES)
$(shell wget https://falktx.com/data/wasm-things-2022-08-15.tar.gz && tar xf wasm-things-2022-08-15.tar.gz)
$(CURDIR)/resources: $(LV2_RESOURCES)
cp -rL $(TARGET_DIR)/$(NAME).lv2/resources $(CURDIR)/resources
# --------------------------------------------------------------
# Extra rules for Windows icon
@ -375,6 +379,10 @@ $(TARGET_DIR)/%/template-synth.vcv: ../template-synth.vcv
-@mkdir -p "$(shell dirname $@)"
$(SILENT)ln -sf $(abspath $<) $@
$(TARGET_DIR)/%/template-wasm.vcv: ../template-wasm.vcv
-@mkdir -p "$(shell dirname $@)"
$(SILENT)ln -sf $(abspath $<) $@
$(TARGET_DIR)/$(NAME).lv2/resources/%: ../Rack/res/%
-@mkdir -p "$(shell dirname $@)"
$(SILENT)ln -sf $(abspath $<) $@

1211
src/template-wasm.vcv Normal file

File diff suppressed because it is too large Load diff