
all :
	@echo "* Building AAdvent"
	@ghc -fglasgow-exts -isrc --make src/Main.hs -o bin/aadvent


# -- clean
.PHONY	: clean
clean	: 
	@echo "* Cleaning up"

	@rm -f  make/Makefile.deps \
		bin/*
	
	@find src \
			-name "*.o" \
		-o	-name "*.hi" \
		-follow | xargs -n 1 rm -f
		
	@echo



# -- build documents
srcHs	= $(shell find src -name "*.hs" -follow)

.PHONY	: doc
doc	: $(srcHs)
	@echo "* Building documentation"
	@haddock -h -o doc --ignore-all-exports $^ 

