all: lib bin test

lib:
	rootcint -f Dict.cxx -c MyClass.h LinkDef.h
	g++ -I$(ROOTSYS)/include -c Dict.cxx
	g++ -I$(ROOTSYS)/include -shared Dict.cxx -o libLibrary.so 


clean:
	rm -f works1
	rm -f *Dict*
	rm -f *.so
	rm -f *.o
	rm -f *~

bin:
#	g++ -I$(ROOTSYS)/include works1.cxx Dict.cxx -o works1

test:
	@echo ">>>>>> Running the first test (works.cxx) which is a "
	@echo ">>>>>> root script which shows that map<string,double>"
	@echo ">>>>>> is working in ROOT"
	@echo ">>>>>>"
	@echo ">>>>>>"
	@echo ">>>>>>"
	root -q -l works.cxx
	@echo ">>>>>> Running the next test (dontwork.cxx) which is a "
	@echo ">>>>>> root script manifestation of the the 'works' test"
	@echo ">>>>>> which uses code from a small library"
	@echo ">>>>>> It 'seg faults' for me"
	@echo ">>>>>>"
	@echo ">>>>>>"
	@echo ">>>>>>"
	root -q -l dontwork.cxx

