webtools/Makefile

24 lines
554 B
Makefile
Raw Permalink Normal View History

2025-09-25 22:13:29 +00:00
GOROOT := $(shell go env | grep GOROOT | sed -e "s/GOROOT=//g" | sed -e "s/[']//g")
.Phony: build
build: clean build.wasm build.site
.Phony: clean
clean:
-rm -r target
mkdir target
.Phony: build.wasm
build.wasm:
mkdir target/wasm
GOOS=js GOARCH=wasm go build -o target/wasm/clocks.wasm ./cmds/clocks
2025-09-26 07:28:30 +00:00
GOOS=js GOARCH=wasm go build -o target/wasm/gotemplate.wasm ./cmds/gotemplate
2025-09-25 22:13:29 +00:00
cp $(GOROOT)/lib/wasm/wasm_exec.js target/wasm/.
.Phony: build.site
build.site:
cp -r site/* target/.
.Phony: dev
dev: build
( cd target ; python3 -m http.server )