diff options
author | rjones@localhost <rjones@localhost> | 2007-08-30 17:38:09 +0100 |
---|---|---|
committer | rjones@localhost <rjones@localhost> | 2007-08-30 17:38:09 +0100 |
commit | a8b837d5018c488a130fcbea425904817a862210 (patch) | |
tree | 44fc8f4a58d6e1651053c4c40d32b3816add43fa /virt-top/Makefile | |
download | virt-top-a8b837d5018c488a130fcbea425904817a862210.tar.gz virt-top-a8b837d5018c488a130fcbea425904817a862210.tar.xz virt-top-a8b837d5018c488a130fcbea425904817a862210.zip |
Initial import from CVS.
Diffstat (limited to 'virt-top/Makefile')
-rw-r--r-- | virt-top/Makefile | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/virt-top/Makefile b/virt-top/Makefile new file mode 100644 index 0000000..9c7ef0b --- /dev/null +++ b/virt-top/Makefile @@ -0,0 +1,79 @@ +# $Id: Makefile.in,v 1.6 2007/08/23 11:09:19 rjones Exp $ + +PACKAGE := ocaml-libvirt +VERSION := 0.3.2.4 + +INSTALL := /usr/bin/install -c +HAVE_PERLDOC := perldoc + +prefix = /usr/local +exec_prefix = ${prefix} +bindir = ${exec_prefix}/bin + +pkg_curses = yes +pkg_xml_light = yes +pkg_csv = yes + +OCAMLCPACKAGES := -package unix,extlib,curses + +OBJS := virt_top.cmo +ifeq ($(pkg_xml_light),yes) +OBJS += virt_top_xml.cmo +OCAMLCPACKAGES := $(OCAMLCPACKAGES),xml-light +endif +ifeq ($(pkg_csv),yes) +OBJS += virt_top_csv.cmo +OCAMLCPACKAGES := $(OCAMLCPACKAGES),csv +endif +OBJS += virt_top_main.cmo + +XOBJS := $(OBJS:.cmo=.cmx) + +OCAMLCPACKAGES += -I ../libvirt +OCAMLCFLAGS := -g -w s +OCAMLCLIBS := -linkpkg + +OCAMLOPTPACKAGES := $(OCAMLCPACKAGES) +OCAMLOPTFLAGS := -w s +OCAMLOPTLIBS := $(OCAMLCLIBS) + +export LIBRARY_PATH=../libvirt +export LD_LIBRARY_PATH=../libvirt + +BYTE_TARGETS := virt-top +OPT_TARGETS := virt-top.opt + +ifeq ($(HAVE_PERLDOC),perldoc) +BYTE_TARGETS += virt-top.1 virt-top.txt +endif + +all: $(BYTE_TARGETS) + +opt: $(OPT_TARGETS) + +virt-top: $(OBJS) + ocamlfind ocamlc $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) \ + ../libvirt/mllibvirt.cma -o $@ $^ + +virt-top.opt: $(XOBJS) + ocamlfind ocamlopt \ + $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \ + ../libvirt/mllibvirt.cmxa -cclib -lncurses -o $@ $^ + +# Manual page. +ifeq ($(HAVE_PERLDOC),perldoc) +virt-top.1: virt-top.pod + pod2man -c "Virtualization Support" --release "$(PACKAGE)-$(VERSION)" \ + $< > $@ + +virt-top.txt: virt-top.pod + pod2text $< > $@ +endif + +install: + if [ -x virt-top.opt ]; then \ + mkdir -p $(DESTDIR)$(bindir); \ + $(INSTALL) -m 0755 virt-top.opt $(DESTDIR)$(bindir)/virt-top; \ + fi + +include ../Make.rules |