# Diskimage library. # @configure_input@ # Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. PACKAGE := @PACKAGE_NAME@ VERSION := @PACKAGE_VERSION@ INSTALL := @INSTALL@ HAVE_PERLDOC := @HAVE_PERLDOC@ OCAML_WORD_SIZE := @OCAML_WORD_SIZE@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ OCAMLCPACKAGES := -package unix,extlib,bitstring.syntax #---------------------------------------------------------------------- # Build up the list of object files. OBJS := int63.cmo \ diskimage_impl.cmo # Plugin objects. OBJS += diskimage_ext2.cmo \ diskimage_linux_swap.cmo \ diskimage_linux_swsuspend.cmo \ diskimage_fat.cmo \ diskimage_ntfs.cmo \ diskimage_lvm2_metadata.cmo \ diskimage_lvm2_parser.cmo \ diskimage_lvm2_lexer.cmo \ diskimage_lvm2.cmo \ diskimage_mbr.cmo OBJS += diskimage.cmo XOBJS := $(OBJS:.cmo=.cmx) #---------------------------------------------------------------------- SYNTAX := -syntax bitstring.syntax OCAMLCFLAGS := @OCAMLCFLAGS@ $(SYNTAX) OCAMLCLIBS := -linkpkg OCAMLOPTPACKAGES := $(OCAMLCPACKAGES) OCAMLOPTFLAGS := @OCAMLOPTFLAGS@ $(SYNTAX) OCAMLOPTLIBS := $(OCAMLCLIBS) OCAMLDEPFLAGS := $(SYNTAX) BYTE_TARGETS := diskimage.cma OPT_TARGETS := diskimage.cmxa all: $(BYTE_TARGETS) opt: $(OPT_TARGETS) diskimage.cma: $(OBJS) ocamlfind ocamlc $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) \ -a -o $@ $^ diskimage.cmxa: $(XOBJS) ocamlfind ocamlopt \ $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) \ -a -o $@ $^ # 'make depend' doesn't catch these dependencies because the .mli file # is auto-generated. diskimage_lvm2_parser.cmo: diskimage_lvm2_parser.cmi diskimage_lvm2_parser.cmx: diskimage_lvm2_parser.cmi diskimage_lvm2_parser.cmi: diskimage_lvm2_parser.mli diskimage_lvm2_lexer.cmo: diskimage_impl.cmi diskimage_lvm2_parser.cmo: diskimage_impl.cmi diskimage_lvm2_lexer.cmx: diskimage_impl.cmi diskimage_lvm2_parser.cmx: diskimage_impl.cmi # Int63 module is defined differently on 32 and 64 bit platforms. int63.ml: int63_on_$(OCAML_WORD_SIZE).ml Makefile rm -f $@ echo "(* WARNING: THIS FILE IS GENERATED FROM $< *)" | \ cat - $< > $@ int63.mli: int63_on_$(OCAML_WORD_SIZE).mli Makefile rm -f $@ echo "(* WARNING: THIS FILE IS GENERATED FROM $< *)" | \ cat - $< > $@ int63.cmo: int63.cmi int63.cmx: int63.cmi int63.cmi: int63.ml int63.mli #test_int63.opt: int63.cmx test_int63.cmx # $(OCAMLFIND) ocamlopt $^ -o $@ install: ocamlfind install diskimage META *.mli *.cma *.cmx *.cmxa *.a include ../Make.rules