Added clocks tool

This commit is contained in:
Leon Mika 2025-09-26 08:13:29 +10:00
parent 8dc2621f87
commit 7073a2d3f2
23 changed files with 1061 additions and 3 deletions

23
Makefile Normal file
View file

@ -0,0 +1,23 @@
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
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 )