Skip to content

Commit cca8984

Browse files
committed
move files around
1 parent 26caed3 commit cca8984

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ EOPTS = $(addprefix -s $(EMPTY), $(EOPT)) # Add '-s ' to each option
99
# Builds necessary files
1010
build: $(OBJS)
1111
mkdir build
12-
mkdir app/wasm
13-
$(CC) $(FILES) -O3 $(EOPTS) -o app/wasm/module.js -s WASM=1 -Wall -s MODULARIZE=1
14-
$(CC) src/c/counter.c -O3 $(EOPTS) -s SIDE_MODULE=1 -s WASM=1 -o app/wasm/counter.wasm
15-
emcc src/c/engine.c -O3 -o app/wasm/engine.js -s WASM=1 -Wall -s MODULARIZE=1
12+
$(CC) $(FILES) -O3 $(EOPTS) -o build/module.js -s WASM=1 -Wall -s MODULARIZE=1
13+
$(CC) src/c/counter.c -O3 $(EOPTS) -s SIDE_MODULE=1 -s WASM=1 -o build/counter.wasm
14+
emcc src/c/engine.c -O3 -o build/engine.js -s WASM=1 -Wall -s MODULARIZE=1
1615

1716
# O3 is is a optimization setting
1817
# WASM=1 means set web assembly to ture
@@ -30,5 +29,4 @@ dist: build
3029
# Cleans up object files and build directory
3130
clean:
3231
rm -rf build
33-
rm -rf app/wasm
3432
rm $(OBJS)

app/counter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import CounterWA from './wasm/counter.wasm';
1+
import CounterWA from '../build/counter.wasm';
22

33
export class Counter {
44
counterModule;

app/engine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Module from './wasm/engine.js'
1+
import Module from '../build/engine.js'
22

33
export class Engine {
44

app/opengl-demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Module from './wasm/module.js'
1+
import Module from '../build/module.js'
22

33
export class OpenGLDemo {
44

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = {
4747
ExtractTextPluginConfig,
4848
// Need to copy some wasm files as we import the JS file from the emcc MODULARIZE setting
4949
new CopyWebpackPlugin([{
50-
from: 'app/wasm/*.wasm',
50+
from: 'build/*.wasm',
5151
to: 'wasm/[name].wasm'
5252
}])
5353
],

0 commit comments

Comments
 (0)