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
17 helm-thread helm-xml helm-pxp helm-tactics helm-registry
19 IMPLEMENTATION_FILES = \
22 hbugs_id_generator.ml \
28 $(patsubst %.ml, %.mli, $(IMPLEMENTATION_FILES))
30 include ../Makefile.common
32 include .generated_tutors.ml
35 echo -n "TUTORS_ML = " > $@
36 scripts/ls_tutors.ml | xargs >> $@
38 echo -n "GENERATED_TUTORS_ML = " > $@
39 scripts/ls_tutors.ml -auto | xargs >> $@
41 TUTORS = $(patsubst %.ml, %, $(TUTORS_ML))
42 TUTORS_OPT = $(patsubst %, %.opt, $(TUTORS))
43 GENERATED_TUTORS = $(patsubst %.ml, %, $(GENERATED_TUTORS_ML))
45 hbugs_client_gui.ml hbugs_client_gui.mli: hbugs_client_gui.glade
46 lablgladecc2 $< > hbugs_client_gui.ml
47 $(OCAMLC) -i hbugs_client_gui.ml > hbugs_client_gui.mli
52 rm -f $(TUTORS) $(TUTORS_OPT) broker{,.opt} client{,.opt}
54 rm -f $(GENERATED_TUTORS_ML) hbugs_client_gui.ml{,i}
55 rm -f .tutors.ml .generated_tutors.ml
60 hbugs_id_generator.cmo
61 TUTOR_DEPS = $(MAINS_DEPS) \
63 BROKER_DEPS = $(MAINS_DEPS) \
64 hbugs_broker_registry.cmo
65 CLIENT_DEPS = $(MAINS_DEPS) \
66 hbugs_client_gui.cmo \
69 TUTOR_DEPS_OPT = $(patsubst %.cmo, %.cmx, $(TUTOR_DEPS))
70 BROKER_DEPS_OPT = $(patsubst %.cmo, %.cmx, $(BROKER_DEPS))
71 CLIENT_DEPS_OPT = $(patsubst %.cmo, %.cmx, $(CLIENT_DEPS))
72 $(GENERATED_TUTORS_ML): scripts/build_tutors.ml data/tutors_index.xml data/hbugs_tutor.TPL.ml
73 scripts/build_tutors.ml
74 hbugs_tutors.cmo: hbugs_tutors.cmi
75 hbugs_broker_registry.cmo: hbugs_broker_registry.cmi
77 daemons: tutors broker
80 %_tutor: $(TUTOR_DEPS) %_tutor.ml
81 $(OCAMLC) -linkpkg -o $@ $^
82 %_tutor.opt: $(TUTOR_DEPS_OPT) %_tutor.ml
83 $(OCAMLOPT) -linkpkg -o $@ $^
84 broker: $(BROKER_DEPS) broker.ml
85 $(OCAMLC) -linkpkg -o $@ $^
86 broker.opt: $(BROKER_DEPS_OPT) broker.ml
87 $(OCAMLOPT) -linkpkg -o $@ $^
88 client: $(CLIENT_DEPS) client.ml
89 $(OCAMLC) -linkpkg -o $@ $^
90 client.opt: $(CLIENT_DEPS_OPT) client.ml
91 $(OCAMLOPT) -linkpkg -o $@ $^
95 scripts/brokerctl.sh start
96 scripts/sabba.sh start
98 scripts/brokerctl.sh stop