Package: coinst / 1.9.1-1

make_byte Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--- a/Makefile
+++ b/Makefile
@@ -18,25 +18,43 @@
        repository.cmx quotient.cmx conflicts.cmx graph.cmx coinst_common.cmx
 COMPFLAGS=-package unix,str,bigarray,cudf -g -I viewer
 OPTLINKFLAGS=$(COMPFLAGS) -linkpkg
+BYTELINKFLAGS=$(OPTLINKFLAGS) -dllib -lbytearray_stubs -cclib -lbytearray_stubs -dllib -ltask_stubs -cclib -ltask_stubs
 
 OCAMLDEP=ocamlfind ocamldep
 DEPFLAGS = -package js_of_ocaml,js_of_ocaml.syntax -syntax camlp4o -I viewer
 
 all: $(COINST) $(UPGRADE) $(TRANS)
+opt: all
+byte: dllbytearray_stubs.so dlltask_stubs.so $(COINST).byte $(UPGRADE).byte $(TRANS).byte
+
+dllbytearray_stubs.so: bytearray_stubs.o
+	ocamlmklib -o bytearray_stubs $^
+
+dlltask_stubs.so: task_stubs.o
+	ocamlmklib -o task_stubs $^
 
 $(COINST): $(OBJS) cudf_lib.cmx coinst_json.cmx coinst.cmx
 	$(OCAMLOPT) -o $@  $(OPTLINKFLAGS) $^ $(LINKFLAGS)
 
-$(COINST).byte: $(OBJS:.cmx=.cmo) cudf_lib.cmo coinst.cmo
-	$(OCAMLC) -o $@  $(OPTLINKFLAGS) $^ $(LINKFLAGS)
+$(COINST).byte: $(OBJS:.cmx=.cmo) cudf_lib.cmo coinst_json.cmo coinst.cmo
+	$(OCAMLC) -o $@  $(BYTELINKFLAGS) $^ $(LINKFLAGS)
+	cp $@ $(COINST)
 
 
 $(UPGRADE): $(OBJS) $(TASK) $(SVG) upgrade_common.cmx upgrade.cmx upgrade_main.cmx
 	$(OCAMLOPT) -o $@  $(OPTLINKFLAGS) $^ $(LINKFLAGS)
 
+$(UPGRADE).byte: $(OBJS:.cmx=.cmo) $(TASK:.cmx=.cmo) $(SVG:.cmx=.cmo)  upgrade_common.cmo upgrade.cmo upgrade_main.cmo
+	$(OCAMLC) -o $@  $(BYTELINKFLAGS) $^ $(LINKFLAGS)
+	cp $@ $(UPGRADE)
+
 $(TRANS): $(OBJS) $(TASK) $(SVG) update_data.cmx upgrade_common.cmx upgrade.cmx horn.cmx transition.cmx
 	$(OCAMLOPT) -o $@  $(OPTLINKFLAGS) $^ $(LINKFLAGS)
 
+$(TRANS).byte: $(OBJS:.cmx=.cmo) $(TASK:.cmx=.cmo) $(SVG:.cmx=.cmo) update_data.cmo upgrade_common.cmo upgrade.cmo horn.cmo transition.cmo
+	$(OCAMLC) -o $@  $(BYTELINKFLAGS) $^ $(LINKFLAGS)
+	cp $@ $(TRANS)
+
 clean::
 	rm -f $(COINST) $(UPGRADE) $(TRANS) $(COINST).byte $(UPGRADE).byte $(TRANS).byte