aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-06-10 03:17:39 +0000
committerbloodstalker <thabogre@gmail.com>2018-06-10 03:17:39 +0000
commit394262751bd166606a11c9db1e16a08b177ad807 (patch)
tree99a090bff851b97103e458f3ea1048d3a31187b7 /bruiser
parentadded the autogen files, should also fix travis (diff)
downloadmutator-394262751bd166606a11c9db1e16a08b177ad807.tar.gz
mutator-394262751bd166606a11c9db1e16a08b177ad807.zip
fix
Diffstat (limited to '')
-rw-r--r--bruiser/makefile12
-rwxr-xr-xbruiser/tablegen.sh6
2 files changed, 13 insertions, 5 deletions
diff --git a/bruiser/makefile b/bruiser/makefile
index 3f38539..393a7ae 100644
--- a/bruiser/makefile
+++ b/bruiser/makefile
@@ -21,7 +21,7 @@ TBG_OBJLIST_INC=$(patsubst ./luatablegen/%.c, ./luatablegen/%.o, $(wildcard ./lu
######################################RULES####################################
.DEFAULT: all
-.PHONY: all clean help tablegen
+.PHONY: all clean help
all: $(BRUISER)
@@ -46,8 +46,13 @@ dependc:.dependc
linenoise.o:
$(CC) $(CC_FLAGS) linenoise/linenoise.c -c -o linenoise.o
-tablegen:
- ../extra-tools/tablegen-test/run.sh
+./wasmtablegen.json:
+ if [[ ls -l ./luatablegen | wc -l == 2 ]];then ./tablegen.sh;else :;fi
+
+./luatablegen/%.c: ./wasmtablegen.json
+ ./tablegen.sh
+
+./luatablegen/%.o:./luatablegen/%.c
$(MAKE) -C luatablegen
$(LIB_LUA):
@@ -59,6 +64,7 @@ $(LIB_LUA_JIT):
@echo "building with jit"
$(BRUISER): $(BRUISER).o ../mutator_aux.o ../tinyxml2/tinyxml2.o linenoise.o CompletionHints.o mutagen.o ORCmutation.o bruiserffi.o asmrewriter.o bruisercapstone.o ramdump.o ffs.o $(LIB_LUA) $(TBG_OBJLIST_INC)
+ @echo $(TBG_OBJLIST_INC)
$(CXX) $^ $(LD_FLAGS) -o $@
clean:
diff --git a/bruiser/tablegen.sh b/bruiser/tablegen.sh
index 5172d60..03a660c 100755
--- a/bruiser/tablegen.sh
+++ b/bruiser/tablegen.sh
@@ -1,5 +1,7 @@
#!/usr/bin/bash
cd $(dirname $0)
../extra-tools/luatablegen.py --tbg ./wasmtablegen.json --out ./luatablegen --luaheader ../lua-5.3.4/src --pre ./luatablegen/wasmheader.txt --headeraggr ./luatablegen/wasm_tables.h --lualibpath ./lua-scripts/wasm.lua
-make -C ./luatablegen
-make clean
+if [[ $1 == test ]]; then
+ make -C ./luatablegen
+ make clean
+fi