7 SOURCES_BASE
= readline.cs types.cs reader.cs printer.cs
8 SOURCES_LISP
= env.cs core.cs stepA_mal.cs
9 SOURCES
= $(SOURCES_BASE
) $(SOURCES_LISP
)
11 OTHER_SOURCES
= getline.cs
15 SRCS
= step0_repl.cs step1_read_print.cs step2_eval.cs step3_env.cs \
16 step4_if_fn_do.cs step5_tco.cs step6_file.cs step7_quote.cs \
17 step8_macros.cs step9_try.cs stepA_mal.cs
19 LIB_SRCS
= $(filter-out step
%,$(OTHER_SOURCES
) $(SOURCES
))
21 FLAGS
= $(if
$(strip $(DEBUG
)),-debug
+,)
25 all: mal.exe
$(patsubst %.cs
,%.exe
,$(SRCS
))
27 mal.exe
: $(patsubst %.cs
,%.exe
,$(word $(words $(SOURCES
)),$(SOURCES
)))
31 mcs
$(FLAGS
) -target
:library
$+ -out
:$@
34 mcs
$(FLAGS
) -r
:mal.dll
$<
37 rm -f
*.dll
*.exe
*.mdb
39 .PHONY
: stats tests
$(TESTS
)
43 @printf
"%5s %5s %5s %s\n" `grep -E "^[[:space:]]*//|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
44 stats-lisp
: $(SOURCES_LISP
)
46 @printf
"%5s %5s %5s %s\n" `grep -E "^[[:space:]]*//|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"