aboutsummaryrefslogtreecommitdiff
path: root/rust/Makefile
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-10-25 13:00:01 -0500
committerJoel Martin <github@martintribe.org>2015-01-06 21:58:57 -0600
commit8f5b0f1040de849da3fb5ade645308e7bbe7f025 (patch)
treea65a2e2c1db5013338a83af101becf676517ba1d /rust/Makefile
parent0ab374bc261f871ab8fbbc13e0096f44225e2a3f (diff)
downloadmal-8f5b0f1040de849da3fb5ade645308e7bbe7f025.tar.gz
mal-8f5b0f1040de849da3fb5ade645308e7bbe7f025.zip
Rust: add step3_env
Diffstat (limited to 'rust/Makefile')
-rw-r--r--rust/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/rust/Makefile b/rust/Makefile
new file mode 100644
index 0000000..335f621
--- /dev/null
+++ b/rust/Makefile
@@ -0,0 +1,30 @@
+#####################
+
+SOURCES_BASE = src/types.rs src/readline.rs \
+ src/reader.rs src/printer.rs
+SOURCES_LISP = src/step3_env.rs
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
+
+#####################
+
+SRCS = step0_repl.rs step1_read_print.rs step2_eval.rs step3_env.rs
+BINS = $(SRCS:%.rs=target/%)
+
+#####################
+
+all: $(BINS) mal
+
+mal: ${SOURCES_BASE} ${SOURCES_LISP}
+ cargo build
+ cp $(word $(words ${BINS}),${BINS}) $@
+
+clean:
+ cargo clean
+ rm -f mal
+
+.PHONY: stats stats-lisp
+
+stats: $(SOURCES)
+ @wc $^
+stats-lisp: $(SOURCES_LISP)
+ @wc $^