Some fixes for latest upstream sexplib.
[rpmdepsize.git] / Makefile.am
1 # rpmdepsize Makefile.am
2 # (C) Copyright 2009 Red Hat Inc.
3 #
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.
8 #
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.
13 #
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., 675 Mass Ave, Cambridge, MA 02139, USA.
17 #
18 # Written by Richard W.M. Jones <rjones@redhat.com>
19
20 ACLOCAL_AMFLAGS = -I m4
21
22 MLFILES = rpmdepsize_about.ml rpmdepsize_errors.ml rpmdepsize.ml
23
24 EXTRA_DIST = \
25         $(MLFILES) rpmdepsize_about.ml.in \
26         rpmdepsize.spec rpmdepsize.spec.in
27
28 CLEANFILES = rpmdepsize *.annot *.cmi *.cmo *.cmx *.o *~
29
30 bin_SCRIPTS = rpmdepsize
31
32 OCAMLFLAGS = \
33         -dtypes \
34         -package lablgtk2,sexplib,unix,extlib,sexplib.syntax \
35         -syntax camlp4o
36 OCAMLCLIBS = -linkpkg gtkInit.cmo
37 OCAMLOPTLIBS = -linkpkg gtkInit.cmx
38
39 if OCAML_BYTE_COMPILER
40 rpmdepsize: $(MLFILES:.ml=.cmo)
41         $(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLCLIBS) $^ -o $@
42 else
43 rpmdepsize: $(MLFILES:.ml=.cmx)
44         $(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLOPTLIBS) $^ -o $@
45 endif
46
47 .mli.cmi:
48         $(OCAMLFIND) ocamlc $(OCAMLFLAGS) -c $<
49 .ml.cmo:
50         $(OCAMLFIND) ocamlc $(OCAMLFLAGS) -c $<
51 .ml.cmx:
52         $(OCAMLFIND) ocamlopt $(OCAMLFLAGS) -c $<