DYNINST_INCLUDE = /usr/include/dyninst
DYNINST_LIB =  /usr/lib64/dyninst

CXX = g++
CXXFLAGS = -g -Wall -O3
LIBFLAGS = -fpic -shared

CC = gcc
CFLAGS = -Wall -pedantic -g -std=gnu99


all: test_instrumentation test 

test_instrumentation: test_instrumentation.o
	$(CXX) $(CXXFLAGS) -L$(DYNINST_LIB) \
		-o test_instrumentation test_instrumentation.o \
		-lcommon \
		-ldyninstAPI

test_instrumentation.o: test_instrumentation.cpp
	$(CXX) $(CXXFLAGS) -I$(DYNINST_INCLUDE) -c test_instrumentation.cpp

test: test.c
	$(CXX) test.c -o test -fPIC -pie

clean:
	rm -f test test_instrumentation.o test_instrumentation
