# mclu: Mini Cloud # Copyright (C) 2014-2015 Red Hat Inc. # # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. CLEANFILES = *~ *.cmi *.cmo *.cmx ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ $(SOURCES_MLI) \ $(SOURCES_ML) \ templates/rawhide.sh # In alphabetical order. SOURCES_MLI = \ mclu_boot.mli \ mclu_conf.mli \ mclu_console.mli \ mclu_destroy.mli \ mclu_list.mli \ mclu_onoff.mli \ mclu_reboot.mli \ mclu_status.mli \ mclu_viewer.mli \ parallel.mli \ template.mli \ utils.mli # These must appear in dependency order. SOURCES_ML = \ config.ml \ utils.ml \ parallel.ml \ template.ml \ mclu_conf.ml \ mclu_list.ml \ mclu_status.ml \ mclu_onoff.ml \ mclu_destroy.ml \ mclu_reboot.ml \ mclu_console.ml \ mclu_viewer.ml \ mclu_boot.ml \ mclu.ml OCAMLPACKAGES = -package unix,pcre,libvirt OCAMLFLAGS = -g -warn-error CDEFLMPSUVYZX-3 BOBJECTS = $(SOURCES_ML:.ml=.cmo) XOBJECTS = $(BOBJECTS:.cmo=.cmx) if !HAVE_OCAMLOPT OBJECTS = $(BOBJECTS) BEST = ocamlc else OBJECTS = $(XOBJECTS) BEST = ocamlopt endif bin_PROGRAMS = mclu mclu_SOURCES = exit.c mclu_CPPFLAGS = -I$(OCAMLLIB) mclu_DEPENDENCIES = $(OBJECTS) mclu_LINK = \ ./link.sh \ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) \ $(OBJECTS) -o $@ .mli.cmi: $(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ .ml.cmo: $(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ if HAVE_OCAMLOPT .ml.cmx: $(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ endif # Dependencies. depend: .depend .depend: $(SOURCES_MLI) $(SOURCES_ML) rm -f $@ $@-t $(OCAMLFIND) ocamldep -I $(abs_srcdir) -I . $^ | \ $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ sort > $@-t mv $@-t $@ -include .depend DISTCLEANFILES = .depend .PHONY: depend # Configuration file. sysconf_DATA = mclu.conf # Documentation. man_MANS = mclu.1 mclu.1: mclu.pod $(POD2MAN) \ -c "Virtualization Support" \ --release "$(PACKAGE)-$(VERSION)" \ $< > $@-t mv $@-t $@