# Delete or change next line depending on location of dyninst
DYNINST=/usr
# DYNINST=/work/scox/dyninst/install
DYNINST_LIBS := $(shell if realpath -eq $(DYNINST)/lib64/dyninst/ ; then : ; elif realpath -eq $(DYNINST)/lib ; then : ; fi)
LINK=-L$(DYNINST_LIBS) -ldyninstAPI -ldl -lboost_system

all:	mutatee mutator

clean:
	rm mutatee mutator

mutatee:	mutatee.cpp
	$(CC) -g -o mutatee mutatee.c

mutator:	mutator.cpp
	$(CXX) -g -I$(DYNINST)/include $(LINK) -o mutator mutator.cpp

test: mutator mutatee
	./mutatee & LD_LIBRARY_PATH=$(DYNINST_LIBS) DYNINSTAPI_RT_LIB=$(DYNINST_LIBS)/libdyninstAPI_RT.so ./mutator $$!
