aboutsummaryrefslogtreecommitdiff
path: root/ocaml/Makefile
diff options
context:
space:
mode:
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