7 SOURCES_BASE
= readline.vb types.vb reader.vb printer.vb
8 SOURCES_LISP
= env.vb core.vb stepA_mal.vb
9 SOURCES
= $(SOURCES_BASE
) $(SOURCES_LISP
)
13 SRCS
= step0_repl.vb step1_read_print.vb step2_eval.vb \
14 step3_env.vb step4_if_fn_do.vb step5_tco.vb step6_file.vb \
15 step7_quote.vb step8_macros.vb step9_try.vb stepA_mal.vb
17 LIB_CS_SRCS
= getline.cs
18 LIB_VB_SRCS
= $(filter-out step
%,$(filter %.vb
,$(SOURCES
)))
20 FLAGS
= $(if
$(strip $(DEBUG
)),-debug
:full
,)
24 all: mal.exe
$(patsubst %.vb
,%.exe
,$(SRCS
))
26 mal.exe
: $(patsubst %.vb
,%.exe
,$(word $(words $(SOURCES
)),$(SOURCES
)))
29 mal_cs.dll
: $(LIB_CS_SRCS
)
30 mcs
$(FLAGS
) -target
:library
$+ -out
:$@
32 mal_vb.dll
: mal_cs.dll
$(LIB_VB_SRCS
)
33 vbnc
$(FLAGS
) -target
:library
-r
:mal_cs.dll
$(LIB_VB_SRCS
) -out
:$@
35 %.exe
: %.vb mal_vb.dll
36 vbnc
$(FLAGS
) -r
:mal_vb.dll
-r
:mal_cs.dll
$<
39 rm -f
*.dll
*.exe
*.mdb
41 .PHONY
: stats tests
$(TESTS
)
45 @printf
"%5s %5s %5s %s\n" `grep -E "^[[:space:]]*'|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
46 stats-lisp
: $(SOURCES_LISP
)
48 @printf
"%5s %5s %5s %s\n" `grep -E "^[[:space:]]*'|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"