# 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@ OCAMLLIB = @OCAMLLIB@ pkg_gettext = @pkg_gettext@ CC = @CC@ CFLAGS = @CFLAGS@ -fPIC -Wall -Werror -I$(OCAMLLIB) -I@top_srcdir@ SYNTAX = -syntax bitstring.syntax OCAMLCPACKAGES = -package unix,bigarray,extlib,libvirt,xml-light,bitstring.syntax ifneq ($(pkg_gettext),no) OCAMLCPACKAGES += -package gettext-stub endif OCAMLCFLAGS = @OCAMLCFLAGS@ $(SYNTAX) OCAMLCLIBS = -linkpkg OCAMLOPTFLAGS = @OCAMLOPTFLAGS@ $(SYNTAX) OCAMLOPTPACKAGES = $(OCAMLCPACKAGES) OCAMLOPTLIBS = -linkpkg OCAMLDEPFLAGS = $(SYNTAX) OBJS = virt_mem_gettext.cmo \ virt_mem_version.cmo \ virt_mem_kernels.cmo \ virt_mem_utils.cmo \ virt_mem_mmap_c.o \ virt_mem_mmap.cmo \ kernel.cmo \ virt_mem_types.cmo \ virt_mem_ksyms.cmo \ virt_mem_kallsyms.cmo \ virt_mem_utsname.cmo \ virt_mem.cmo \ virt_mem_capture.cmo \ virt_mem_dump.cmo XOBJS = $(OBJS:%.cmo=%.cmx) all: byte opt byte: virt_mem.cma opt: virt_mem.cmxa virt_mem.cma: $(OBJS) ocamlmklib -o virt_mem $^ virt_mem.cmxa: $(XOBJS) ocamlmklib -o virt_mem $^ # Just for testing Virt_mem_mmap module: test_mmap: virt_mem_utils.cmx virt_mem_mmap_c.o virt_mem_mmap.cmx test_mmap.cmx ocamlfind ocamlopt \ $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) \ bitstring.cmxa -o $@ $^ install: include ../Make.rules