blob: 8f854966e7b7c298de6a24f46af52ea085b5ff4f (
plain)
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
29
30
31
32
33
34
35
|
#####################
SOURCES_BASE = types.nim reader.nim printer.nim
#SOURCES_LISP = env.nim core.nim stepA_interop.nim
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
#####################
SRCS = step0_repl.nim step1_read_print.nim step2_eval.nim
BINS = $(SRCS:%.nim=%)
#####################
all: $(BINS) mal
mal: $(word $(words $(BINS)),$(BINS))
#nimble build
cp $< $@
define dep_template
$(1): $(SOURCES_BASE) $(1).nim
nim c $$@
endef
$(foreach b,$(BINS),$(eval $(call dep_template,$(b))))
clean:
rm -rf nimcache/ $(BINS)
rm -f mal
.PHONY: stats stats-lisp
stats: $(SOURCES)
@wc $^
#stats-lisp: $(SOURCES_LISP)
# @wc $^
|