Commit | Line | Data |
---|---|---|
8f5b0f10 JM |
1 | ##################### |
2 | ||
3 | SOURCES_BASE = src/types.rs src/readline.rs \ | |
85bec8a0 JM |
4 | src/reader.rs src/printer.rs \ |
5 | src/env.rs src/core.rs | |
90f618cb | 6 | SOURCES_LISP = src/env.rs src/core.rs src/stepA_mal.rs |
8f5b0f10 JM |
7 | SOURCES = $(SOURCES_BASE) $(SOURCES_LISP) |
8 | ||
9 | ##################### | |
10 | ||
2ab1e584 | 11 | SRCS = step1_read_print.rs step2_eval.rs step3_env.rs \ |
3744d566 | 12 | step4_if_fn_do.rs step5_tco.rs step6_file.rs step7_quote.rs \ |
90f618cb | 13 | step8_macros.rs step9_try.rs stepA_mal.rs |
434516e0 | 14 | BINS = $(SRCS:%.rs=target/release/%) |
8f5b0f10 JM |
15 | |
16 | ##################### | |
17 | ||
2ab1e584 | 18 | all: mal |
8f5b0f10 | 19 | |
4ee7c0f2 | 20 | mal: ${SOURCES_BASE} $(word $(words ${SOURCES_LISP}),${SOURCES_LISP}) |
434516e0 | 21 | cargo build --release |
8f5b0f10 JM |
22 | cp $(word $(words ${BINS}),${BINS}) $@ |
23 | ||
434516e0 JM |
24 | #$(BINS): target/release/%: src/%.rs |
25 | # cargo build --release $* | |
2ab1e584 | 26 | |
8f5b0f10 JM |
27 | clean: |
28 | cargo clean | |
29 | rm -f mal | |
30 | ||
31 | .PHONY: stats stats-lisp | |
32 | ||
33 | stats: $(SOURCES) | |
34 | @wc $^ | |
35 | stats-lisp: $(SOURCES_LISP) | |
36 | @wc $^ |