2014-12-25 07:51:23 +03:00
|
|
|
SOURCES_BASE = Readline.hs Types.hs Reader.hs Printer.hs
|
|
|
|
SOURCES_LISP = Env.hs Core.hs step9_try.hs
|
2014-12-24 06:35:48 +03:00
|
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
|
|
|
|
|
|
|
#####################
|
|
|
|
|
2014-12-24 08:37:43 +03:00
|
|
|
SRCS = step0_repl.hs step1_read_print.hs step2_eval.hs step3_env.hs \
|
2014-12-24 09:49:23 +03:00
|
|
|
step4_if_fn_do.hs step5_tco.hs step6_file.hs step7_quote.hs \
|
2014-12-25 07:51:23 +03:00
|
|
|
step8_macros.hs step9_try.hs stepA_interop.hs
|
2014-12-24 08:37:43 +03:00
|
|
|
OTHER_SRCS = Readline.hs Types.hs Reader.hs Printer.hs Env.hs Core.hs
|
2014-12-24 06:35:48 +03:00
|
|
|
BINS = $(SRCS:%.hs=%)
|
|
|
|
|
|
|
|
#####################
|
|
|
|
|
|
|
|
all: $(BINS) mal
|
|
|
|
|
|
|
|
mal: $(word $(words $(BINS)),$(BINS))
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
$(BINS): %: %.hs $(OTHER_SRCS)
|
|
|
|
ghc --make $< -o $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(BINS) mal *.hi *.o
|
|
|
|
|
|
|
|
.PHONY: stats stats-lisp tests $(TESTS)
|
|
|
|
|
|
|
|
stats: $(SOURCES)
|
|
|
|
@wc $^
|
|
|
|
stats-lisp: $(SOURCES_LISP)
|
|
|
|
@wc $^
|