about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 16 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 8ed2c0b..9b42d96 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,16 @@
-# path to  dyninst binaries
+# EDIT: path to  dyninst binaries
 DYNINST_ROOT = /usr/local
 
+# EDIT: you must set this to your dyninst build directory if you build with v10
+DYNINST_BUILD = /path/to/dyninst/build
+
+# better dont touch these
+DYNINST9=-lcommon -liberty
+DYNINST10=-I$(DYNINST_BUILD)/tbb/src/TBB/src/include -lboost_system -L$(DYNINST_BUILD)/tbb/lib -ltbb -Wl,-rpath $(DYNINST_BUILD)/tbb/lib
+
+# EDIT: set this to either DYNINST9 or DYNINST10 depending on what you installed
+DYNINST_OPT = $(DYNINST9)
+
 # path to afl src 
 AFL_ROOT = ./afl 
 
@@ -17,17 +27,14 @@ LIBFLAGS = -fpic -shared
 CC = gcc
 CFLAGS = -Wall -pedantic -g -std=gnu99
 
-
 all: afl-dyninst libAflDyninst.so
-# afl-dyninst2 
 
-afl-dyninst: afl-dyninst.o
+afl-dyninst:	afl-dyninst.o
 	$(CXX) $(CXXFLAGS) -L$(DYNINST_ROOT)/lib \
 		-L$(DEPS_ROOT)/lib \
 		-o afl-dyninst afl-dyninst.o \
-		-lcommon \
-		-liberty \
-		-ldyninstAPI 
+		$(DYNINST_OPT) \
+		-ldyninstAPI
 
 afl-dyninst2: afl-dyninst2.o
 	$(CXX) $(CXXFLAGS) -L$(DYNINST_ROOT)/lib \
@@ -41,10 +48,10 @@ libAflDyninst.so: libAflDyninst.cpp
 	$(CXX) $(CXXFLAGS) $(LIBFLAGS) -I$(AFL_ROOT) -I$(DEPS_ROOT)/include libAflDyninst.cpp -o libAflDyninst.so
 
 afl-dyninst.o: afl-dyninst.cpp
-	$(CXX) $(CXXFLAGS) -I$(DEPS_ROOT)/include -I$(DYNINST_ROOT)/include  -c afl-dyninst.cpp
+	$(CXX) $(CXXFLAGS) $(DYNINST_OPT) -I$(DEPS_ROOT)/include -I$(DYNINST_ROOT)/include  -c afl-dyninst.cpp
 
 afl-dyninst2.o: afl-dyninst2.cpp
-	$(CXX) $(CXXFLAGS) -I$(DEPS_ROOT)/include -I$(DYNINST_ROOT)/include  -c afl-dyninst2.cpp
+	$(CXX) $(CXXFLAGS) $(DYNINST_OPT) -I$(DEPS_ROOT)/include -I$(DYNINST_ROOT)/include  -c afl-dyninst2.cpp
 
 clean:
 	rm -f afl-dyninst *.so *.o