aboutsummaryrefslogtreecommitdiff
path: root/nim/Makefile
diff options
context:
space:
mode:
authordef <dennis@felsin9.de>2015-02-28 14:14:18 +0100
committerdef <dennis@felsin9.de>2015-02-28 14:23:19 +0100
commitb94acce656db4f0b129cd939765c0ca451f6a538 (patch)
treeb18e1bfc4865248ab1578989ecbdbec1e1fd04e2 /nim/Makefile
parent937f0cdc6614592b9057c023be67b8ff0db8758c (diff)
downloadmal-b94acce656db4f0b129cd939765c0ca451f6a538.tar.gz
mal-b94acce656db4f0b129cd939765c0ca451f6a538.zip
Nim: step1
Diffstat (limited to 'nim/Makefile')
-rw-r--r--nim/Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/nim/Makefile b/nim/Makefile
new file mode 100644
index 0000000..5fba42c
--- /dev/null
+++ b/nim/Makefile
@@ -0,0 +1,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
+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 $^