aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-24 01:30:53 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-24 20:39:10 +0800
commit13c4a755e66cbff0ac0c65eece015bddbe152ed2 (patch)
tree8924deb64637ced0753a7ad341bf968af2c5f94e /Makefile
parenttmpl.go: Separate the template into its own file (diff)
downloadpowxy-13c4a755e66cbff0ac0c65eece015bddbe152ed2.tar.gz
powxy-13c4a755e66cbff0ac0c65eece015bddbe152ed2.tar.zst
powxy-13c4a755e66cbff0ac0c65eece015bddbe152ed2.zip
Use a WebAssembly solverv0.1.10
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a75b758..55b8578 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,10 @@
-powxy: *.go version.go
+powxy: *.go version.go wasm/solver.wasm
go build -o powxy
version.go:
printf 'package main\n\nfunc init() {\n\tglobal.Version = "%s"\n}\n' $(shell git describe --tags --always --dirty) > $@
+wasm/solver.wasm: wasm/solver.c wasm/sha256.c wasm/sha256.h
+ clang --target=wasm32 -nostdlib -Wl,--no-entry -Wl,--export-all -o wasm/solver.wasm wasm/solver.c wasm/sha256.c
+
.PHONY: version.go