aboutsummaryrefslogtreecommitdiff
path: root/ocaml/Makefile
diff options
context:
space:
mode:
authorChouser <chouser@n01se.net>2015-01-22 02:59:48 -0500
committerChouser <chouser@n01se.net>2015-01-30 12:54:42 -0500
commit59d10e1bd703f65e12fef85bceef4204f82685fb (patch)
treed603eb4b18dca19d4351b40164765363f9866d3c /ocaml/Makefile
parentca51c4f77235d8f9b8606ebc8c255778c83c9050 (diff)
downloadmal-59d10e1bd703f65e12fef85bceef4204f82685fb.tar.gz
mal-59d10e1bd703f65e12fef85bceef4204f82685fb.zip
Ocaml: Added step 1, missing some optional functionality
Diffstat (limited to 'ocaml/Makefile')
-rw-r--r--ocaml/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/ocaml/Makefile b/ocaml/Makefile
new file mode 100644
index 0000000..a46b82a
--- /dev/null
+++ b/ocaml/Makefile
@@ -0,0 +1,16 @@
+STEPS = step0_repl.ml step1_read_print.ml
+MODULES = types.ml reader.ml printer.ml
+LIBS = str.cma
+
+BINS = $(STEPS:%.ml=%)
+
+all: $(BINS) mal oc
+
+mal: $(word $(words $(BINS)),$(BINS))
+ cp $< $@
+
+$(BINS): %: %.ml $(MODULES)
+ ocamlc $(LIBS) $(MODULES) $< -o $@
+
+clean:
+ rm -f $(BINS) mal *.cmi *.cmo