CXX ?= /opt/llvm-tot/bin/clang++
PWD = $(shell pwd)

.PHONY: all
all:
	$(CXX) -std=c++11 -c -fPIC TestClass.cpp -o TestClass.o
	$(CXX) -fPIC -shared -Wl,-soname,libTestClass.so -o libTestClass.so TestClass.o
	$(CXX) -std=c++11 -fsanitize=memory main.cpp -lTestClass -L$(PWD) -Wl,-R$(PWD)
	./a.out

.PHONY: clean
clean:
	rm -rf a.out libTestClass.so TestClass.o
