unicorn speedtest makefile cleanup
MODIFY
unicorn_mode/samples/speedtest/c/Makefile
unicorn_mode/samples/speedtest/c/Makefile
@@ -29,7 +29,11 @@ MYCC = $(__CC:$(_UNIQ)$(CROSS)=$(CROSS)gcc)
.PHONY: all clean
-all: fuzz
+all: ../target harness
+
+afl-fuzz: ../../../../afl-fuzz
+../../../../afl-fuzz:
+ $(MAKE) -C ../../../../ afl-fuzz
clean:
rm -rf *.o harness harness-debug
@@ -49,6 +53,6 @@ harness-debug: harness-debug.o
../target:
$(MAKE) -C ..
-fuzz: ../target harness
+fuzz: all afl-fuzz
rm -rf ./output
- SKIP_BINCHECK=1 ../../../../afl-fuzz -s 1 -i ../sample_inputs -o ./output -- ./harness @@
+ SKIP_BIN_CHECK=1 ../../../../afl-fuzz -s 1 -i ../sample_inputs -o ./output -- ./harness @@

MODIFY
unicorn_mode/samples/speedtest/python/Makefile
unicorn_mode/samples/speedtest/python/Makefile
-all: fuzz
+.PHONY: all fuzz
+
+all: ../target
+
+afl-fuzz: ../../../../afl-fuzz
+../../../../afl-fuzz:
+ $(MAKE) -C ../../../../ afl-fuzz
+
../target:
$(MAKE) -C ..
-fuzz: ../target
+fuzz: all afl-fuzz
rm -rf ./ouptput
../../../../afl-fuzz -s 1 -U -i ../sample_inputs -o ./output -- python3 harness.py @@

MODIFY
unicorn_mode/samples/speedtest/rust/Makefile
unicorn_mode/samples/speedtest/rust/Makefile
-all: fuzz
+.PHONY: all fuzz
+
+all: ../target ./target/release/unicornafl_harness
+
+afl-fuzz: ../../../../afl-fuzz
+../../../../afl-fuzz:
+ $(MAKE) -C ../../../../ afl-fuzz
clean:
cargo clean
@@ -12,6 +18,6 @@ clean:
../target:
$(MAKE) -c ..
-fuzz: ../target ./target/release/unicornafl_harness
+fuzz: all afl-fuzz
rm -rf ./output
- SKIP_BINCHECK=1 ../../../../afl-fuzz -s 1 -i ../sample_inputs -o ./output -- ./target/release/unicornafl_harness @@
+ SKIP_BIN_CHECK=1 ../../../../afl-fuzz -s 1 -i ../sample_inputs -o ./output -- ./target/release/unicornafl_harness @@

unicorn speedtest makefile cleanup