# virt-mem # @configure_input@ # Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA PACKAGE = @PACKAGE_NAME@ VERSION = @PACKAGE_VERSION@ INSTALL = @INSTALL@ MKDIR_P = @MKDIR_P@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ pkg_gettext = @pkg_gettext@ SYNTAX = -syntax bitstring.syntax OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax -I ../lib ifneq ($(pkg_gettext),no) OCAMLCPACKAGES += -package gettext-stub endif OCAMLCFLAGS = @OCAMLCFLAGS@ $(SYNTAX) OCAMLCLIBS = -linkpkg bitstring.cma ../lib/virt_mem.cma OCAMLOPTFLAGS = @OCAMLOPTFLAGS@ $(SYNTAX) OCAMLOPTPACKAGES = $(OCAMLCPACKAGES) OCAMLOPTLIBS = -linkpkg bitstring.cmxa ../lib/virt_mem.cmxa OCAMLDOCFLAGS = -html -sort $(OCAMLCPACKAGES) $(SYNTAX) OCAMLDEPFLAGS = $(SYNTAX) TARGETS = virt-mem virt-mem.opt OBJS = $(shell for t in $(TOOLS); do echo ../$$t/virt_$$t.cmo; done) virt_mem_main.cmo XOBJS = $(OBJS:%.cmo=%.cmx) all: $(TARGETS) virt-mem: ../lib/virt_mem.cma $(OBJS) ocamlfind ocamlc \ $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(OCAMLCLIBS) $(OBJS) -o $@ virt-mem.opt: ../lib/virt_mem.cmxa $(XOBJS) ocamlfind ocamlopt \ $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) $(XOBJS) -o $@ install: if [ -x virt-mem.opt ]; then \ $(MKDIR_P) $(DESTDIR)$(bindir); \ $(INSTALL) -m 0755 virt-mem.opt $(DESTDIR)$(bindir)/virt-mem; \ (cd $(DESTDIR)$(bindir) && \ for t in $(TOOLS); do ln -f virt-mem virt-$$t; done \ ); \ fi include ../Make.rules