aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..da9657a
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,32 @@
+OCAMLC=ocamlc.opt
+OCAMLOPT=ocamlopt.opt
+OCAMLDEP=ocamldep.opt
+INCLUDES=
+OCAMLFLAGS=$(INCLUDES)
+SRCS=game.ml ltg.ml
+BUILDDIR=
+DEPEND=.depend
+
+all: ltg.opt
+
+ltg.opt: ltg.cmx
+ $(OCAMLOPT) $(OCAMLFLAGS) -o ../run game.cmx ltg.cmx
+
+clean:
+ rm -f *.cm? *.cmx? *.o *~
+ rm -f .depend
+
+depend: $(SRCS)
+ $(OCAMLDEP) $(SRCS) > $(DEPEND)
+
+.SUFFIXES: .mli .ml .cmo .cmi .cmx
+
+%.cmo : %.ml
+ $(OCAMLC) -c $(OCAMLFLAGS) $<
+%.cmi : %.mli
+ $(OCAMLC) -c $(OCAMLFLAGS) $<
+%.cmx : %.ml
+ $(OCAMLOPT) -c $(OCAMLFLAGS) $<
+
+-include $(DEPEND)
+