aboutsummaryrefslogtreecommitdiff
path: root/gcc_plugin/Makefile
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-02-16 18:16:10 +0100
committervan Hauser <vh@thc.org>2020-02-16 18:16:10 +0100
commit204059c61aca2ccdde64fbb59dbf6d86fb243bb3 (patch)
treec7ed9fb911835f570470bc0e0bf0193fe5434f9e /gcc_plugin/Makefile
parent4cccdb89c0112931e451bc0719880813d15d14dc (diff)
downloadafl++-204059c61aca2ccdde64fbb59dbf6d86fb243bb3.tar.gz
check for mistyped env vars
Diffstat (limited to 'gcc_plugin/Makefile')
-rw-r--r--gcc_plugin/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc_plugin/Makefile b/gcc_plugin/Makefile
index 9d312a94..4dcec72f 100644
--- a/gcc_plugin/Makefile
+++ b/gcc_plugin/Makefile
@@ -25,7 +25,7 @@ HELPER_PATH = $(PREFIX)/lib/afl
BIN_PATH = $(PREFIX)/bin
CFLAGS ?= -O3 -g -funroll-loops
-CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -Wno-pointer-sign \
+CFLAGS += -Wall -I../include -D_FORTIFY_SOURCE=2 -Wno-pointer-sign \
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
CXXFLAGS ?= -O3 -g -funroll-loops
@@ -81,8 +81,11 @@ test_deps:
@test -f ../afl-showmap || ( echo "[-] Oops, can't find '../afl-showmap'. Be sure to compile AFL first."; exit 1 )
@echo "[+] All set and ready to build."
-../afl-gcc-fast: afl-gcc-fast.c | test_deps
- $(CC) -DAFL_GCC_CC=\"$(CC)\" -DAFL_GCC_CXX=\"$(CXX)\" $(CFLAGS) $< -o $@ $(LDFLAGS)
+afl-common.o: ../src/afl-common.c
+ $(CC) $(CFLAGS) -c $< -o $@ $(LDFLAGS)
+
+../afl-gcc-fast: afl-gcc-fast.c afl-common.o | test_deps
+ $(CC) -DAFL_GCC_CC=\"$(CC)\" -DAFL_GCC_CXX=\"$(CXX)\" $(CFLAGS) $< afl-common.o -o $@ $(LDFLAGS)
ln -sf afl-gcc-fast ../afl-g++-fast
../afl-gcc-pass.so: afl-gcc-pass.so.cc | test_deps