-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 672 Bytes
/
Makefile
File metadata and controls
28 lines (21 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SRC_DIRS := 'src' $(shell test -d 'vendor' && echo 'vendor')
ALL_VFILES := $(shell find $(SRC_DIRS) -name "*.v")
PROJ_VFILES := $(shell find 'src' -name "*.v")
COQARGS :=
default: $(PROJ_VFILES:.v=.vo)
.coqdeps.d: $(ALL_VFILES)
@echo "COQDEP $@"
@coqdep -f _CoqProject $(ALL_VFILES) > $@
ifneq ($(MAKECMDGOALS), clean)
-include .coqdeps.d
endif
%.vo: %.v
@echo "COQC $<"
@coqc $(COQARGS) $(shell cat '_CoqProject') $< -o $@
clean:
@echo "CLEAN vo glob aux"
@rm -f $(ALL_VFILES:.v=.vo) $(ALL_VFILES:.v=.vos) $(ALL_VFILES:.v=.vok) $(ALL_VFILES:.v=.glob)
@find $(SRC_DIRS) -name ".*.aux" -exec rm {} \;
rm -f .coqdeps.d
.PHONY: default clean
.DELETE_ON_ERROR: