github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/examples/wasm/GNUmakefile (about)

     1  invoke: clean wasm_exec
     2  	tinygo build -o ./html/wasm.wasm -target wasm -no-debug ./invoke/wasm.go
     3  	cp ./invoke/wasm.js ./html/
     4  	cp ./invoke/index.html ./html/
     5  
     6  export: clean wasm_exec
     7  	tinygo build -o ./html/wasm.wasm -target wasm -no-debug ./export/wasm.go
     8  	cp ./export/wasm.js ./html/
     9  	cp ./export/index.html ./html/
    10  
    11  callback: clean wasm_exec
    12  	tinygo build -o ./html/wasm.wasm -target wasm ./callback/wasm.go
    13  	cp ./callback/wasm.js ./html/
    14  	cp ./callback/index.html ./html/
    15  
    16  slices: clean wasm_exec
    17  	tinygo build -o ./html/wasm.wasm -target wasm -no-debug ./slices/wasm.go
    18  	cp ./slices/wasm.js ./html/
    19  	cp ./slices/index.html ./html/
    20  
    21  
    22  main: clean wasm_exec
    23  	tinygo build -o ./html/wasm.wasm -target wasm -no-debug ./main/main.go
    24  	cp ./main/index.html ./html/
    25  
    26  wasm_exec:
    27  	cp `tinygo env TINYGOROOT`/targets/wasm_exec.js ./html/
    28  
    29  clean:
    30  	rm -rf ./html
    31  	mkdir ./html