default :
	@echo arguments:
	@echo	debugLib
	@echo	releaseLib
	@echo	docs
	@echo	clean
	@echo	cleanAll

include dir.make

debugLib : prep Debug 
	@$(MAKE) --no-print-directory -f debug.make

releaseLib : prep Release
	@$(MAKE) --no-print-directory -f release.make

prep :
	@if test -f error.log; then echo Removed old error.log;\
	rm -f error.log; fi
	@cd ..;\
 	pwd | sed -e 's/\(.*\)*/std::string odemxPath("&");/' > OdemXPath.h;\
 	echo "Path to library main directory stored in OdemXPath.h:"; pwd;\
	cd GCC;

docs : 
	@if ! doxygen ../Doxygen/Doxyfile; then \
	echo Documentation requires Doxygen to be installed;\
	fi

clean ::
	@if test -f error.log; then echo Removed error.log;\
	rm -f error.log; fi
	@if test -f ../OdemXPath.h; then echo Removed OdemXPath.h;\
	rm ../OdemXPath.h; fi
	
cleanAll: clean
	@if test -d ../doc; then \
	rm -rf ../doc;\
	echo Removed documentation;\
	fi
	@if test -d ../examples/GCC/Debug -o -d ../examples/GCC/Release; then \
	rm -rf ../examples/GCC/Debug;\
	rm -rf ../examples/GCC/Release;\
	echo Removed example binaries;\
	fi
	
	