Use -g for ocamlopt. ocamlopt has supported generating DWARF
information for quite a long time.
Also use -warn-error with the same set of warnings as is used
by libguestfs.
Fix a warning in examples/get_cpu_stats.ml found by enabling
-warn-error.
OCAMLFIND = @OCAMLFIND@
OCAMLCPACKAGES := -package unix -I ../libvirt
-OCAMLCFLAGS := -g
+OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
OCAMLCLIBS := -linkpkg
OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
-OCAMLOPTFLAGS :=
+OCAMLOPTFLAGS := -g -warn-error CDEFLMPSUVYZX-3
OCAMLOPTLIBS := $(OCAMLCLIBS)
export LIBRARY_PATH=../libvirt
let conn = C.connect_readonly () in
+ (*
let nr_pcpus =
let info = C.get_node_info conn in
C.maxcpus_of_node_info info in
+ *)
let stats =
let dom = D.lookup_by_name conn domname in
ifneq ($(OCAMLFIND),)
OCAMLCPACKAGES := -package unix
-OCAMLCFLAGS := -g
+OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
OCAMLCLIBS := -linkpkg
else
OCAMLCINCS :=
-OCAMLCFLAGS := -g
+OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
OCAMLCLIBS := unix.cma
endif
-OCAMLOPTFLAGS :=
+OCAMLOPTFLAGS := $(OCAMLCFLAGS)
ifneq ($(OCAMLFIND),)
OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
OCAMLOPTLIBS := $(OCAMLCLIBS)