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
48 OCAMLPACKAGES = -package unix,extlib,curses,str,libvirt
51 OCAMLPACKAGES += -package gettext-stub
67 OCAMLPACKAGES += -package xml-light
71 OCAMLPACKAGES += -package csv
74 BOBJS += opt_calendar.cmo
75 OCAMLPACKAGES += -package calendar
79 XOBJS = $(BOBJS:.cmo=.cmx)
81 OCAMLFLAGS = -g -warn-error CDEFLMPSUVYZX-3 -ccopt '@CFLAGS@'
84 bin_PROGRAMS = virt-top
86 virt_top_SOURCES = dummy.c
94 virt_top_DEPENDENCIES = $(OBJECTS)
96 ../ocaml-link.sh -cclib '$(OCAMLLIBS)' -- \
97 $(OCAMLFIND) $(OCAMLBEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) \
101 $(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
103 $(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
105 $(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
108 .depend: $(srcdir)/*.ml $(srcdir)/*.mli
115 virt-top.1: virt-top.pod
116 pod2man -u --section 1 -c "Virtualization Support" \
117 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
120 virt-top.txt: virt-top.pod
123 CLEANFILES += virt-top.1 virt-top.txt