2014-06-29 01:32:44 +00:00
|
|
|
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
|
2014-07-15 20:56:36 +00:00
|
|
|
$(LEAN) $(LEAN_OPTIONS) $< -o $@
|
2014-06-29 01:32:44 +00:00
|
|
|
|
|
|
|
%.olean: %.lua
|
2014-07-15 20:56:36 +00:00
|
|
|
$(LEAN) $(LEAN_OPTIONS) $< -o $@
|
2014-06-29 01:32:44 +00:00
|
|
|
|
|
|
|
.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
|