2 # Copyright (C) 2011 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 OCAMLPACKAGES = -package unix,camlp4.lib
21 -g -warn-error CDEFLMPSUVYZX \
22 -I ../generator-lib $(OCAMLPACKAGES)
23 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
25 # In alphabetical order.
27 wrappi_boilerplate.mli \
28 wrappi_boilerplate.ml \
39 # In dependency order.
42 wrappi_boilerplate.cmo \
48 noinst_SCRIPTS = generator
50 generator: $(OBJECTS) ../generator-lib/generator_lib.cma ../APIs/apis.cma
51 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -linkpkg \
52 ../generator-lib/generator_lib.cma ../APIs/apis.cma \
56 %.cmi: %.mli ../generator-lib/generator_lib.cma
57 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
59 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
61 $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) -c $< -o $@
64 noinst_DATA = stamp-generator
66 stamp-generator: generator
67 cd $(top_srcdir) && generator/generator
73 $(OCAMLFIND) ocamldep $^ | \
74 $(SED) -e 's/ *$$//' | \
75 $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
81 CLEANFILES = *.cmi *.cmo *.cmx *~ generator
83 SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly