aboutsummaryrefslogtreecommitdiff
path: root/nim/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'nim/Makefile')
-rw-r--r--nim/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/nim/Makefile b/nim/Makefile
new file mode 100644
index 0000000..1da1ae6
--- /dev/null
+++ b/nim/Makefile
@@ -0,0 +1,33 @@
+#####################
+
+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 step3_env.nim \
+ step4_if_fn_do.nim step5_tco.nim step6_file.nim step7_quote.nim \
+ step8_macros.nim step9_try.nim stepA_interop.nim
+BINS = $(SRCS:%.nim=%)
+
+#####################
+
+all: $(BINS) mal
+
+mal: $(word $(words $(BINS)),$(BINS))
+ cp $< $@
+
+$(BINS):
+ nim -d:release c $@
+
+clean:
+ rm -rf nimcache/ $(BINS)
+ rm -f mal
+
+.PHONY: stats stats-lisp
+
+stats: $(SOURCES)
+ @wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^