aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/wasm/test/linker/makefile
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-06-01 08:07:09 +0000
committerbloodstalker <thabogre@gmail.com>2018-06-01 08:07:09 +0000
commitc3531e8e096cf5f1ecc723acf602e157995267da (patch)
tree97eabe759383eb7b876fa15cd7cd42c270e6ef07 /bruiser/wasm/test/linker/makefile
parentadded test files for the wasm linker. added two scripts to extra-tools (diff)
downloadmutator-c3531e8e096cf5f1ecc723acf602e157995267da.tar.gz
mutator-c3531e8e096cf5f1ecc723acf602e157995267da.zip
fixed a bug with default.lua. added the blueprint for the wasm interface to bruiser.
Diffstat (limited to '')
-rw-r--r--bruiser/wasm/test/linker/makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/bruiser/wasm/test/linker/makefile b/bruiser/wasm/test/linker/makefile
new file mode 100644
index 0000000..5cffbcc
--- /dev/null
+++ b/bruiser/wasm/test/linker/makefile
@@ -0,0 +1,44 @@
+TARGET=file0
+CC=clang
+CC?=clang
+CC_FLAGS=
+CC_EXTRA?=
+CC_FLAGS+=$(CC_EXTRA)
+
+SRCS=$(wildcard *.c)
+WASM=$(patsubst %.c, %.wasm, $(wildcard *.c))
+
+.DEFAULT:all
+
+.PHONY:all clean help
+
+all:$(TARGET) wasmforce
+
+depend:.depend
+
+.depend:$(SRCS)
+ rm -rf .depend
+ $(CC) -MM $(CC_FLAGS) $^ > ./.depend
+
+-include ./.depend
+
+%.wasm:%.c
+ ../../../../extra-tools/llvm-wasm $<
+
+wasmforce:$(WASM)
+ @echo forcing generation of wasm and wast
+
+.c.o:
+ $(CC) $(CC_FLAGS) -c $< -o $@
+
+$(TARGET): $(TARGET).o
+ $(CC) $^ $(LD_FLAGS) -o $@
+
+clean:
+ rm -f *.s *.wasm *.wast *.bc *.o *~ $(TARGET)
+ rm .depend
+
+help:
+ @echo "all is the default target"
+ @echo "there is delete."
+ @echo "there is clean."