2 # Copyright (C) 2007-2021 Red Hat Inc., Richard W.M. Jones
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 CLEANFILES = *~ *.bak *.orig *.rej
19 CLEANFILES += *.cmi *.cmo *.cma *.cmx *.cmxa dll*.so *.a *.annot
47 OCAMLPACKAGES = -package unix,curses,str,libvirt
50 OCAMLPACKAGES += -package gettext-stub
66 BOBJS += opt_calendar.cmo
67 OCAMLPACKAGES += -package calendar
71 XOBJS = $(BOBJS:.cmo=.cmx)
75 -warn-error +C+D+E+F+L+M+P+S+U+V+Y+Z+X-3 \
77 OCAMLLIBS = $(LIBXML2_LIBS)
79 bin_PROGRAMS = virt-top
81 virt_top_SOURCES = xml-c.c
92 virt_top_DEPENDENCIES = $(OBJECTS)
94 ../ocaml-link.sh -cclib '$(OCAMLLIBS)' -- \
95 $(OCAMLFIND) $(OCAMLBEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) \
99 $(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
101 $(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
103 $(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
106 .depend: $(srcdir)/*.ml $(srcdir)/*.mli
113 virt-top.1: virt-top.pod
114 pod2man -u --section 1 -c "Virtualization Support" \
115 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
118 virt-top.txt: virt-top.pod
121 CLEANFILES += virt-top.1 virt-top.txt