2 # Copyright (C) 2013 Red Hat Inc.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 ACLOCAL_AMFLAGS = -I m4
24 virt-similarity.spec \
25 virt-similarity.spec.in \
28 CLEANFILES = *~ *.cmi *.cmo *.cmx *.cma *.cmxa virt-similarity
30 OCAMLPACKAGES = -package unix,guestfs
31 OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES)
32 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
34 # Sources in alphabetical order.
45 # Objects in build order.
54 XOBJECTS = $(OBJECTS:.cmo=.cmx)
56 bin_SCRIPTS = virt-similarity
59 virt-similarity: $(XOBJECTS)
60 $(OCAMLFIND) opt $(OCAMLOPTFLAGS) \
61 -linkpkg $(XOBJECTS) -o $@
63 virt-similarity: $(OBJECTS)
64 $(OCAMLFIND) c $(OCAMLCFLAGS) \
65 -linkpkg $(OBJECTS) -o $@
68 # Rules for all OCaml files.
70 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
72 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
74 $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -c $< -o $@
76 SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly
83 $(OCAMLFIND) ocamldep $^ | \
84 $(SED) -e 's/ *$$//' | \
85 $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
92 man_MANS = virt-similarity.1
94 virt-similarity.1: virt-similarity.pod
96 -c "Virtualization Tools" \
97 --release "$(PACKAGE)-$(VERSION)" \
103 rpmbuild -ta $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
106 licensecheck $$(git ls-files)