diff --git a/Makefile b/Makefile index 1240788..49045bf 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,9 @@ WASM2C := $(WABT_DIR)/bin/wasm2c %.wat.html: %.wat venv/bin/pygmentize -l wat -O full -f html $^ -o $@ +%.py.html: %.py + venv/bin/pygmentize -l py -O full -f html $^ -o $@ + %.wasm: %.wat $(WAT2WASM) $^ -o $@ @@ -18,7 +21,7 @@ WASM2C := $(WABT_DIR)/bin/wasm2c # %.exe: %.c # cc $^ -o $@ -I $(WABT_DIR)/wasm2c -examples: venv/.done $(subst .py,.wasm,$(wildcard examples/*.py)) $(subst .py,.wat.html,$(wildcard examples/*.py)) +examples: venv/.done $(subst .py,.wasm,$(wildcard examples/*.py)) $(subst .py,.wat.html,$(wildcard examples/*.py)) $(subst .py,.py.html,$(wildcard examples/*.py)) venv/bin/python3 -m http.server --directory examples test: venv/.done diff --git a/examples/.gitignore b/examples/.gitignore index 6edc9f7..de726e0 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -1,3 +1,4 @@ +*.py.html *.wasm *.wat *.wat.html diff --git a/examples/buffer.html b/examples/buffer.html index 294ba0f..d0b14ca 100644 --- a/examples/buffer.html +++ b/examples/buffer.html @@ -6,7 +6,7 @@

Buffer

-List - Source - WebAssembly +List - Source - WebAssembly
diff --git a/examples/fib.html b/examples/fib.html index 865c5a1..7a2bccb 100644 --- a/examples/fib.html +++ b/examples/fib.html @@ -5,7 +5,7 @@

Fibonacci

-List - Source - WebAssembly +List - Source - WebAssembly