Commit | Line | Data |
---|---|---|
afde2df0 JM |
1 | ##################### |
2 | ||
3 | TESTS = | |
4 | ||
b18969c0 | 5 | SOURCES = readline.cs types.cs reader.cs printer.cs env.cs core.cs \ |
5a159ae7 | 6 | step7_quote.cs |
b18969c0 | 7 | |
53beaa0a | 8 | OTHER_SOURCES = getline.cs |
afde2df0 JM |
9 | |
10 | ##################### | |
11 | ||
afdf531e | 12 | SRCS = step0_repl.cs step1_read_print.cs step2_eval.cs step3_env.cs \ |
5a159ae7 | 13 | step4_if_fn_do.cs step5_tco.cs step6_file.cs step7_quote.cs |
53beaa0a | 14 | |
53beaa0a | 15 | LIB_SRCS = $(filter-out step%,$(OTHER_SOURCES) $(SOURCES)) |
afde2df0 | 16 | |
b18969c0 JM |
17 | FLAGS = -debug+ |
18 | ||
afde2df0 JM |
19 | ##################### |
20 | ||
b18969c0 | 21 | all: mal.exe $(patsubst %.cs,%.exe,$(SRCS)) |
afde2df0 | 22 | |
53beaa0a | 23 | mal.exe: $(patsubst %.cs,%.exe,$(word $(words $(SOURCES)),$(SOURCES))) |
afde2df0 JM |
24 | cp $< $@ |
25 | ||
53beaa0a JM |
26 | mal.dll: $(LIB_SRCS) |
27 | mcs $(FLAGS) -target:library $+ -out:$@ | |
afde2df0 | 28 | |
53beaa0a JM |
29 | %.exe: %.cs mal.dll |
30 | mcs $(FLAGS) -r:mal.dll $< | |
afde2df0 JM |
31 | |
32 | clean: | |
53beaa0a | 33 | rm -f *.dll *.exe *.mbd |
afde2df0 JM |
34 | |
35 | .PHONY: stats tests $(TESTS) | |
36 | ||
37 | stats: $(SOURCES) | |
38 | @wc $^ | |
39 | ||
40 | tests: $(TESTS) | |
41 | ||
42 | $(TESTS): | |
43 | @echo "Running $@"; \ | |
44 | ./$@ || exit 1; \ |