Browse Source

optimized hot reloading

rexim 6 years ago
parent
commit
b1f7deef29
2 changed files with 16 additions and 1 deletions
  1. 5 1
      ocaml-hotreload/.gitignore
  2. 11 0
      ocaml-hotreload/Makefile

+ 5 - 1
ocaml-hotreload/.gitignore

@@ -1,4 +1,8 @@
 *.cma
 *.cmi
 *.cmo
-probe
+*.cmx
+*.cmxs
+*.o
+probe
+probe.opt

+ 11 - 0
ocaml-hotreload/Makefile

@@ -11,3 +11,14 @@ animation.cmo: animation.ml
 
 probe: animation.cma main.ml
 	ocamlfind ocamlc -o probe -linkpkg -package dynlink animation.cma main.ml
+
+# ------------------------------
+
+probe.opt: animation.cmx main.ml
+	ocamlfind ocamlopt -o probe.opt -linkpkg -package dynlink animation.cmx main.ml
+
+animation.cmx: animation.ml
+	ocamlopt -c animation.ml
+
+test_animation.cmxs: animation.cmx test_animation.ml
+	ocamlopt -o test_animation.cmxs -c animation.cmx test_animation.ml