CPP=g++
#LINK=-L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst -L/opt/rh/devtoolset-2/root/usr/lib$(BITS)/dyninst/lib -ldyninstAPI -ldynC -ldl
INCLUDE=-I/usr/include/dyninst
#INCLUDE=-I/opt/rh/devtoolset-2/root/usr/include/dyninst
# Delete or change next line depending on location of dyninst
# DYNINST_PREFIX=/work/scox/dyn/dyninst-9.3.2-1/BUILD/dyninst-9.3.2/install
DYNINST=$(DYNINST_PREFIX)/usr/lib64/dyninst/
LINK2=-L/usr/lib64/dyninst -ldyninstAPI -ldl -lboost_system

all:	mutatee mutator

clean:
	rm mutatee mutator mutated

mutatee:	mutatee.cpp
	$(CPP) -g -L$(DYNINST) $(INCLUDE) -ldyninstAPI -o mutatee mutatee.cpp

mutator:	mutator.cpp
	$(CPP) -g -L$(DYNINST) $(INCLUDE) $(LINK2) -ldyninstAPI -o mutator mutator.cpp

test: mutator mutatee
	DYNINSTAPI_RT_LIB=$(DYNINST)/libdyninstAPI_RT.so ./mutator mutatee
	DYNINSTAPI_RT_LIB=$(DYNINST)/libdyninstAPI_RT.so ./mutated
