f7317a7139
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
25 lines
483 B
Text
25 lines
483 B
Text
TOP := $(dir $(lastword $(MAKEFILE_LIST)))
|
|
EXTRACT_DEPS = $(TOP)/extract_deps
|
|
LEAN_FILES = $(wildcard *.lean)
|
|
OLEAN_FILES = $(LEAN_FILES:.lean=.olean)
|
|
DEPS = make.deps
|
|
|
|
all: $(OLEAN_FILES) $(DEPS)
|
|
|
|
%.olean: %.lean
|
|
$(LEAN) $(LEAN_OPTIONS) $< -o $@
|
|
|
|
%.olean: %.lua
|
|
$(LEAN) $(LEAN_OPTIONS) $< -o $@
|
|
|
|
.PHONY: all clean
|
|
|
|
clean:
|
|
-rm -f *.olean $(DEPS)
|
|
|
|
$(DEPS): $(LEAN_FILES)
|
|
LEAN=$(LEAN) $(EXTRACT_DEPS) $(LEAN_FILES) > make.deps
|
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
|
-include $(DEPS)
|
|
endif
|