summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wasm2c/examples/callback/Makefile3
-rw-r--r--wasm2c/examples/fac/Makefile3
-rw-r--r--wasm2c/examples/fac/fac.wasmbin56 -> 0 bytes
-rw-r--r--wasm2c/examples/rot13/Makefile11
-rw-r--r--wasm2c/examples/threads/Makefile6
5 files changed, 14 insertions, 9 deletions
diff --git a/wasm2c/examples/callback/Makefile b/wasm2c/examples/callback/Makefile
index 81ee53ef..ef7abf76 100644
--- a/wasm2c/examples/callback/Makefile
+++ b/wasm2c/examples/callback/Makefile
@@ -1,12 +1,13 @@
# Use implicit rules for compiling C files.
CFLAGS=-I../..
+LDLIBS=-lm
all: callback
clean:
rm -rf callback callback.wasm callback.c callback.h *.o
-callback: main.o callback.o ../../wasm-rt-impl.o ../../wasm-rt-mem-impl.o -lm
+callback: main.o callback.o ../../wasm-rt-impl.o ../../wasm-rt-mem-impl.o
callback.wasm: callback.wat ../../../bin/wat2wasm
../../../bin/wat2wasm --debug-names $< -o $@
diff --git a/wasm2c/examples/fac/Makefile b/wasm2c/examples/fac/Makefile
index 623fcfc3..a14a4a6c 100644
--- a/wasm2c/examples/fac/Makefile
+++ b/wasm2c/examples/fac/Makefile
@@ -1,12 +1,13 @@
# Use implicit rules for compiling C files.
CFLAGS=-I../..
+LDLIBS=-lm
all: fac
clean:
rm -rf fac fac.wasm fac.c *.o
-fac: main.o fac.o ../../wasm-rt-impl.o -lm
+fac: main.o fac.o ../../wasm-rt-impl.o
fac.wasm: fac.wat ../../../bin/wat2wasm
../../../bin/wat2wasm $< -o $@
diff --git a/wasm2c/examples/fac/fac.wasm b/wasm2c/examples/fac/fac.wasm
deleted file mode 100644
index 711421b6..00000000
--- a/wasm2c/examples/fac/fac.wasm
+++ /dev/null
Binary files differ
diff --git a/wasm2c/examples/rot13/Makefile b/wasm2c/examples/rot13/Makefile
index 1d46b3a9..ba93d114 100644
--- a/wasm2c/examples/rot13/Makefile
+++ b/wasm2c/examples/rot13/Makefile
@@ -1,17 +1,20 @@
# Use implicit rules for compiling C files.
CFLAGS=-I../..
+LDLIBS=-lm
all: rot13
clean:
- rm -rf rot13 rot13.wasm rot13.c *.o
+ rm -rf rot13 rot13.wasm rot13.c rot13.h *.o
-rot13: main.o rot13.o ../../wasm-rt-impl.o ../../wasm-rt-mem-impl.o -lm
+rot13: main.o rot13.o ../../wasm-rt-impl.o ../../wasm-rt-mem-impl.o
+
+main.o: rot13.h
rot13.wasm: rot13.wat ../../../bin/wat2wasm
../../../bin/wat2wasm $< -o $@
-rot13.c: rot13.wasm ../../../bin/wasm2c
- ../../../bin/wasm2c $< -o $@ --disable-simd
+rot13.c rot13.h: rot13.wasm ../../../bin/wasm2c
+ ../../../bin/wasm2c $< -o rot13.c --disable-simd
.PHONY: all clean
diff --git a/wasm2c/examples/threads/Makefile b/wasm2c/examples/threads/Makefile
index f6eb9998..b671e482 100644
--- a/wasm2c/examples/threads/Makefile
+++ b/wasm2c/examples/threads/Makefile
@@ -1,14 +1,14 @@
#SANITIZERS=-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all
CFLAGS=-I../.. -g -O2 -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-array-bounds -Wno-ignored-optimization-argument -Wno-tautological-constant-out-of-range-compare -Wno-infinite-recursion -fno-optimize-sibling-calls -frounding-math -fsignaling-nans ${SANITIZERS} -pthread
-LDFLAGS=${SANITIZERS} -pthread
+LDLIBS=${SANITIZERS} -pthread -lm
all: threads
-threads: threads.o sample.o ../../wasm-rt-impl.o ../../wasm-rt-exceptions-impl.o -lm
-
clean:
rm -rf threads sample.wasm sample.c sample.h *.o ../../*.o
+threads: threads.o sample.o ../../wasm-rt-impl.o ../../wasm-rt-exceptions-impl.o
+
sample.wasm: sample.wat ../../../bin/wat2wasm
../../../bin/wat2wasm --debug-names $< -o $@