web-make, web-demo: moved to "plugin folder" structure
This commit is contained in:
parent
ed187c94dd
commit
0be1b41597
@ -24,7 +24,7 @@
|
||||
<head>
|
||||
<title>{{=it.product.name}}</title>
|
||||
<script type="module">
|
||||
import * as demo from "./{{=it.product.bundleName}}.js";
|
||||
import * as demo from "./{{=it.product.bundleName}}/module.js";
|
||||
window.demo = demo;
|
||||
</script>
|
||||
<script>
|
||||
@ -212,7 +212,7 @@ window.addEventListener("load", function (e) {
|
||||
module = new demo.Module();
|
||||
if (!midi && hasMidiInput)
|
||||
midi = await navigator.requestMIDIAccess();
|
||||
await module.init(audioCtx, "{{=it.product.bundleName}}_processor.js", "{{=it.product.bundleName}}.wasm");
|
||||
await module.init(audioCtx, "{{=it.product.bundleName}}/processor.js", "{{=it.product.bundleName}}/module.wasm");
|
||||
node = new demo.Node(module);
|
||||
node.connect(audioCtx.destination, audioOutputIndex);
|
||||
|
||||
|
@ -72,27 +72,27 @@ CXX_SRCS := $(COMMON_DIR)/src/new.cpp $(CXX_SRCS_EXTRA)
|
||||
CXX_OBJS := $(addprefix build/obj/, $(notdir $(CXX_SRCS:.cpp=.o)))
|
||||
endif
|
||||
|
||||
ALL := build/web/$(BUNDLE_NAME).wasm build/web/$(BUNDLE_NAME)_processor.js build/web/$(BUNDLE_NAME).js
|
||||
ALL := build/web/$(BUNDLE_NAME)/module.wasm build/web/$(BUNDLE_NAME)/processor.js build/web/$(BUNDLE_NAME)/module.js
|
||||
|
||||
-include $(COMMON_DIR)/vars-extra.mk
|
||||
|
||||
all: $(ALL)
|
||||
|
||||
ifeq ($(CXX_OBJS),)
|
||||
build/web/$(BUNDLE_NAME).wasm: $(C_OBJS) | build/web
|
||||
build/web/$(BUNDLE_NAME)/module.wasm: $(C_OBJS) | build/web/$(BUNDLE_NAME)
|
||||
$(CC) $^ -o $@ $(CFLAGS_ALL) $(LDFLAGS_ALL)
|
||||
else
|
||||
build/web/$(BUNDLE_NAME).wasm: $(C_OBJS) $(CXX_OBJS) | build/web
|
||||
build/web/$(BUNDLE_NAME)/module.wasm: $(C_OBJS) $(CXX_OBJS) | build/web/$(BUNDLE_NAME)
|
||||
$(CXX) $^ -o $@ $(CFLAGS_ALL) $(CXXFLAGS_ALL) $(LDFLAGS_ALL)
|
||||
endif
|
||||
|
||||
build/web/$(BUNDLE_NAME)_processor.js: $(DATA_DIR)/src/processor.js | build/web
|
||||
build/web/$(BUNDLE_NAME)/processor.js: $(DATA_DIR)/src/processor.js | build/web/$(BUNDLE_NAME)
|
||||
cp $^ $@
|
||||
|
||||
build/web/$(BUNDLE_NAME).js: $(DATA_DIR)/src/module.js | build/web
|
||||
build/web/$(BUNDLE_NAME)/module.js: $(DATA_DIR)/src/module.js | build/web
|
||||
cp $^ $@
|
||||
|
||||
build/web build/obj:
|
||||
build/obj build/web build/web/$(BUNDLE_NAME):
|
||||
mkdir -p $@
|
||||
|
||||
clean:
|
||||
|
Loading…
Reference in New Issue
Block a user