3 # all (default) -> builds hbugs bytecode library hbugs.cma
4 # opt -> builds hbugs native library hbugs.cmxa
5 # daemons -> builds hbugs broker and tutors executables
7 # start -> starts up broker and tutors
8 # stop -> stop broker and tutors
10 # broker -> builds broker executable
11 # tutors -> builds tutors executables
12 # client -> builds hbugs client
16 IMPLEMENTATION_FILES = \
19 hbugs_id_generator.ml \
25 $(patsubst %.ml, %.mli, $(IMPLEMENTATION_FILES))
27 include ../../Makefile.defs
28 include ../Makefile.common
30 include .generated_tutors.ml
33 echo -n "TUTORS_ML = " > $@
34 scripts/ls_tutors.ml | xargs >> $@
36 echo -n "GENERATED_TUTORS_ML = " > $@
37 scripts/ls_tutors.ml -auto | xargs >> $@
39 TUTORS = $(patsubst %.ml, %, $(TUTORS_ML))
40 TUTORS_OPT = $(patsubst %, %.opt, $(TUTORS))
41 GENERATED_TUTORS = $(patsubst %.ml, %, $(GENERATED_TUTORS_ML))
43 hbugs_client_gui.ml hbugs_client_gui.mli: hbugs_client_gui.glade
44 lablgladecc2 $< > hbugs_client_gui.ml
45 $(OCAMLC) -i hbugs_client_gui.ml > hbugs_client_gui.mli
50 rm -f $(TUTORS) $(TUTORS_OPT) broker{,.opt} client{,.opt}
52 rm -f $(GENERATED_TUTORS_ML) hbugs_client_gui.ml{,i}
53 rm -f .tutors.ml .generated_tutors.ml
58 hbugs_id_generator.cmo
59 TUTOR_DEPS = $(MAINS_DEPS) \
61 BROKER_DEPS = $(MAINS_DEPS) \
62 hbugs_broker_registry.cmo
63 CLIENT_DEPS = $(MAINS_DEPS) \
64 hbugs_client_gui.cmo \
67 TUTOR_DEPS_OPT = $(patsubst %.cmo, %.cmx, $(TUTOR_DEPS))
68 BROKER_DEPS_OPT = $(patsubst %.cmo, %.cmx, $(BROKER_DEPS))
69 CLIENT_DEPS_OPT = $(patsubst %.cmo, %.cmx, $(CLIENT_DEPS))
70 $(GENERATED_TUTORS_ML): scripts/build_tutors.ml data/tutors_index.xml data/hbugs_tutor.TPL.ml
71 scripts/build_tutors.ml
72 hbugs_tutors.cmo: hbugs_tutors.cmi
73 hbugs_broker_registry.cmo: hbugs_broker_registry.cmi
75 daemons: tutors broker
78 %_tutor: $(TUTOR_DEPS) %_tutor.ml
79 $(OCAMLC) -linkpkg -o $@ $^
80 %_tutor.opt: $(TUTOR_DEPS_OPT) %_tutor.ml
81 $(OCAMLOPT) -linkpkg -o $@ $^
82 broker: $(BROKER_DEPS) broker.ml
83 $(OCAMLC) -linkpkg -o $@ $^
84 broker.opt: $(BROKER_DEPS_OPT) broker.ml
85 $(OCAMLOPT) -linkpkg -o $@ $^
86 client: $(CLIENT_DEPS) client.ml
87 $(OCAMLC) -linkpkg -o $@ $^
88 client.opt: $(CLIENT_DEPS_OPT) client.ml
89 $(OCAMLOPT) -linkpkg -o $@ $^
93 scripts/brokerctl.sh start
94 scripts/sabba.sh start
96 scripts/brokerctl.sh stop