mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 12:03:41 +00:00
c9721197d5
Prior to this commit, the build instructions were encoded in Makefiles that contained GNU extensions that are unique to GNU Make and incompatible with older implementations. Thie commit renames all Makefiles to GNUmakefile which clearly denotes that the file contains GNU extensions. GNU Make actually first looks for a GNUmakefile, then makefile, THEN Makefile so in addition to simply being more correct and portable, it saves a few unnecessary failed attempts to open the correct build file.
32 lines
869 B
Makefile
32 lines
869 B
Makefile
invoke: clean wasm_exec
|
|
tinygo build -o ./html/wasm.wasm -target wasm -no-debug ./invoke/wasm.go
|
|
cp ./invoke/wasm.js ./html/
|
|
cp ./invoke/index.html ./html/
|
|
|
|
export: clean wasm_exec
|
|
tinygo build -o ./html/wasm.wasm -target wasm -no-debug ./export/wasm.go
|
|
cp ./export/wasm.js ./html/
|
|
cp ./export/index.html ./html/
|
|
|
|
callback: clean wasm_exec
|
|
tinygo build -o ./html/wasm.wasm -target wasm ./callback/wasm.go
|
|
cp ./callback/wasm.js ./html/
|
|
cp ./callback/index.html ./html/
|
|
|
|
slices: clean wasm_exec
|
|
tinygo build -o ./html/wasm.wasm -target wasm -no-debug ./slices/wasm.go
|
|
cp ./slices/wasm.js ./html/
|
|
cp ./slices/index.html ./html/
|
|
|
|
|
|
main: clean wasm_exec
|
|
tinygo build -o ./html/wasm.wasm -target wasm -no-debug ./main/main.go
|
|
cp ./main/index.html ./html/
|
|
|
|
wasm_exec:
|
|
cp `tinygo env TINYGOROOT`/targets/wasm_exec.js ./html/
|
|
|
|
clean:
|
|
rm -rf ./html
|
|
mkdir ./html
|