.PHONY: all clean clean_aux
VS := $(shell find . -type f -name "*.v" -print)

all: Makefile.coq
	$(MAKE) -f $<

Makefile.coq: _CoqProject
	coq_makefile -f $< $(VS) -o $@

clean: Makefile.coq
	$(MAKE) -f $< clean
	rm -f Makefile.coq Makefile.coq.conf .Makefile.coq.d

clean_aux : clean
	find . -regex ".*\.aux" -delete
	find . -regex ".*\.cache" -delete
