3 SOURCES_BASE
= src
/types.rs src
/readline.rs \
4 src
/reader.rs src
/printer.rs \
6 SOURCES_LISP
= src
/env.rs src
/core.rs src
/bin
/stepA_mal.rs
7 SOURCES
= $(SOURCES_BASE
) $(SOURCES_LISP
)
11 SRCS
= step1_read_print.rs step2_eval.rs step3_env.rs \
12 step4_if_fn_do.rs step5_tco.rs step6_file.rs step7_quote.rs \
13 step8_macros.rs step9_try.rs stepA_mal.rs
14 BINS
= $(SRCS
:%.rs
=target
/release
/%)
22 mal
: target
/release
/stepA_mal
25 # TODO: would be nice to build just the step requested
26 $(BINS
): target
/release
/%: src
/bin
/%.rs
$(wildcard src
/*.rs
)
33 .PHONY
: stats stats-lisp mal
37 @printf
"%5s %5s %5s %s\n" `grep -E "^[[:space:]]*//|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
38 stats-lisp
: $(SOURCES_LISP
)
40 @printf
"%5s %5s %5s %s\n" `grep -E "^[[:space:]]*//|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"