runtest: set INPUTRC to /dev/null
[jackhill/mal.git] / nim / Makefile
1 #####################
2
3 SOURCES_BASE = types.nim reader.nim printer.nim
4 SOURCES_LISP = env.nim core.nim stepA_mal.nim
5 SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
6
7 #####################
8
9 SRCS = step0_repl.nim step1_read_print.nim step2_eval.nim step3_env.nim \
10 step4_if_fn_do.nim step5_tco.nim step6_file.nim step7_quote.nim \
11 step8_macros.nim step9_try.nim stepA_mal.nim
12 BINS = $(SRCS:%.nim=%)
13
14 #####################
15
16 all: $(BINS) mal
17
18 mal: $(word $(words $(BINS)),$(BINS))
19 cp $< $@
20
21 $(BINS): %: %.nim
22 nim -d:release c $@
23
24 clean:
25 rm -rf nimcache/ $(BINS)
26 rm -f mal
27
28 .PHONY: stats stats-lisp
29
30 stats: $(SOURCES)
31 @wc $^
32 stats-lisp: $(SOURCES_LISP)
33 @wc $^