瀏覽代碼

optimized hot reloading

rexim 7 年之前
父節點
當前提交
b1f7deef29
共有 2 個文件被更改,包括 16 次插入1 次删除
  1. 5 1
      ocaml-hotreload/.gitignore
  2. 11 0
      ocaml-hotreload/Makefile

+ 5 - 1
ocaml-hotreload/.gitignore

@@ -1,4 +1,8 @@
 *.cma
 *.cma
 *.cmi
 *.cmi
 *.cmo
 *.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
 probe: animation.cma main.ml
 	ocamlfind ocamlc -o probe -linkpkg -package dynlink 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