aboutsummaryrefslogtreecommitdiff
path: root/rust/Makefile
blob: 335f6210511e84c87772c6065d42ccbc04985c29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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 $^