aboutsummaryrefslogtreecommitdiff
path: root/haskell/Makefile
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-12-23 20:35:48 -0700
committerJoel Martin <github@martintribe.org>2015-01-09 16:16:52 -0600
commitb76aa73bc76a28d7c6bb3c5a43acc9afd9ec42c8 (patch)
tree4b57f91dcf1df0e079a4251a1cab78fe0188dfb4 /haskell/Makefile
parenta816262a057ecc4bd1fd07750d21cab81490f336 (diff)
downloadmal-b76aa73bc76a28d7c6bb3c5a43acc9afd9ec42c8.tar.gz
mal-b76aa73bc76a28d7c6bb3c5a43acc9afd9ec42c8.zip
Haskell: steps 0-3
Diffstat (limited to 'haskell/Makefile')
-rw-r--r--haskell/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/haskell/Makefile b/haskell/Makefile
new file mode 100644
index 0000000..d43db16
--- /dev/null
+++ b/haskell/Makefile
@@ -0,0 +1,29 @@
+SOURCES_BASE =
+SOURCES_LISP = step0_repl.hs
+SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
+
+#####################
+
+SRCS = step0_repl.hs step1_read_print.hs step2_eval.hs step3_env.hs
+OTHER_SRCS = Types.hs Reader.hs Printer.hs Env.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 $^