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