waforthc,standalone: Add sieve example

This commit is contained in:
Remko Tronçon 2022-12-18 18:08:11 +01:00
parent c6deb5eba3
commit 97cc42cb89
4 changed files with 12 additions and 1 deletions

View file

@ -3,3 +3,4 @@
/wasm-micro-runtime
/wasmtime-*
/*.tgz
/run_sieve.f

View file

@ -120,6 +120,12 @@ check:
grep "Hello, Forth" test.out
rm test.out
run_sieve.f: ../examples/sieve.f
(cat $< && echo "90000000 sieve") > $@
.PHONY: run-sieve
run-sieve: run_sieve.f
./waforth $<
.PHONY: clean
clean:

View file

@ -3,3 +3,4 @@
/_waforth*
/hello
/waforth*.tgz
/sieve

View file

@ -94,6 +94,9 @@ waforth_core.wasm: ../waforth.wat
.PHONY: package
sieve:
./waforthc --ccflag=-O2 --output=sieve --init="90000000 sieve" ../examples/sieve.f
.PHONY: check
check:
-rm -f test test.out