aboutsummaryrefslogtreecommitdiff
path: root/haskell/Makefile
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2015-03-02 21:33:10 -0600
committerJoel Martin <github@martintribe.org>2015-03-02 21:33:10 -0600
commit835fb7d8b06e2b44792a97ac89994658bf6d00af (patch)
tree578f67726ab9e3ce5fcbc50220e9761a66c5ddf1 /haskell/Makefile
parent6b72e6078a7d505ecf9d711eb4a16fc4dfac36b6 (diff)
parent8a98ef9a3f3a6b6d05d02dc305a0c886c907e0f3 (diff)
downloadmal-835fb7d8b06e2b44792a97ac89994658bf6d00af.tar.gz
mal-835fb7d8b06e2b44792a97ac89994658bf6d00af.zip
Merge branch 'master' into gh-pages
Conflicts: .gitignore
Diffstat (limited to 'haskell/Makefile')
-rw-r--r--haskell/Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/haskell/Makefile b/haskell/Makefile
new file mode 100644
index 0000000..0ac1a75
--- /dev/null
+++ b/haskell/Makefile
@@ -0,0 +1,31 @@
+SOURCES_BASE = Readline.hs Types.hs Reader.hs Printer.hs
+SOURCES_LISP = Env.hs Core.hs step9_try.hs
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
+
+#####################
+
+SRCS = step0_repl.hs step1_read_print.hs step2_eval.hs step3_env.hs \
+ step4_if_fn_do.hs step5_tco.hs step6_file.hs step7_quote.hs \
+ step8_macros.hs step9_try.hs stepA_mal.hs
+OTHER_SRCS = Readline.hs Types.hs Reader.hs Printer.hs Env.hs Core.hs
+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 $^