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 \ |
faee4d12 | 6 | stepA_more.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 \ |
faa20db2 | 13 | step4_if_fn_do.cs step5_tco.cs step6_file.cs step7_quote.cs \ |
faee4d12 | 14 | step8_macros.cs stepA_more.cs |
53beaa0a | 15 | |
53beaa0a | 16 | LIB_SRCS = $(filter-out step%,$(OTHER_SOURCES) $(SOURCES)) |
afde2df0 | 17 | |
b18969c0 JM |
18 | FLAGS = -debug+ |
19 | ||
afde2df0 JM |
20 | ##################### |
21 | ||
b18969c0 | 22 | all: mal.exe $(patsubst %.cs,%.exe,$(SRCS)) |
afde2df0 | 23 | |
53beaa0a | 24 | mal.exe: $(patsubst %.cs,%.exe,$(word $(words $(SOURCES)),$(SOURCES))) |
afde2df0 JM |
25 | cp $< $@ |
26 | ||
53beaa0a JM |
27 | mal.dll: $(LIB_SRCS) |
28 | mcs $(FLAGS) -target:library $+ -out:$@ | |
afde2df0 | 29 | |
53beaa0a JM |
30 | %.exe: %.cs mal.dll |
31 | mcs $(FLAGS) -r:mal.dll $< | |
afde2df0 JM |
32 | |
33 | clean: | |
53beaa0a | 34 | rm -f *.dll *.exe *.mbd |
afde2df0 JM |
35 | |
36 | .PHONY: stats tests $(TESTS) | |
37 | ||
38 | stats: $(SOURCES) | |
39 | @wc $^ | |
40 | ||
41 | tests: $(TESTS) | |
42 | ||
43 | $(TESTS): | |
44 | @echo "Running $@"; \ | |
45 | ./$@ || exit 1; \ |