Merge pull request #383 from asarhaddon/ada2tco-do
[jackhill/mal.git] / rust / Makefile
CommitLineData
8f5b0f10 1
4ef4b17c
JM
2UPPER_STEPS = step4_if_fn_do step5_tco step6_file step7_quote step8_macros step9_try stepA_mal
3STEPS = step0_repl step1_read_print step2_eval step3_env $(UPPER_STEPS)
4
4ef4b17c 5all: $(STEPS)
8f5b0f10 6
4ef4b17c 7dist: mal
8f5b0f10 8
4ef4b17c
JM
9mal: stepA_mal
10 cp $< $@
8f5b0f10 11
4ef4b17c
JM
12%: %.rs
13 cargo build --release --bin $*
14 cp target/release/$* $@
8f5b0f10 15
4ef4b17c
JM
16STEP0_DEPS = readline.rs
17STEP1_DEPS = $(STEP0_DEPS) types.rs reader.rs printer.rs
18STEP3_DEPS = $(STEP1_DEPS) env.rs
19STEP4_DEPS = $(STEP3_DEPS) core.rs
5245b079 20
4ef4b17c
JM
21step0_repl: $(STEP0_DEPS)
22step1_read_print step2_eval: $(STEP1_DEPS)
23step3_env: $(STEP3_DEPS)
24$(UPPER_STEPS): $(STEP4_DEPS)
8f5b0f10 25
c4269f9b 26.PHONY: clean
2ab1e584 27
8f5b0f10
JM
28clean:
29 cargo clean
4ef4b17c 30 rm -f $(STEPS)
8f5b0f10 31 rm -f mal