2 # Translator from Modelica 2.x to flat Modelica
4 # Copyright (C) 2005 - 2007 Imagine S.A.
5 # For more information or commercial use please contact us at www.amesim.com
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License
9 # as published by the Free Software Foundation; either version 2
10 # of the License, or (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 INCLUDES=-I ../parsing -I ../compilation
29 OCAMLFLAGS=$(INCLUDES)
31 OCAMLFLAGS=-g $(INCLUDES)
33 OCAMLOPTFLAGS=$(INCLUDES)
35 LIBSOPT=$(LIBS:.cma=.cmxa)
37 DOCS=instantiation.mli
40 OBJSOPT=$(SRCS:.ml=.cmx)
42 LIBOPT=$(LIB:.cma=.cmxa)
44 .SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi
47 $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp)
48 $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp)
52 $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp)
53 $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp)
57 $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp)
58 $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp)
62 $(OCAMLC) $(OCAMLFLAGS) -c $<
65 $(OCAMLC) $(OCAMLFLAGS) -c $<
68 $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $<
73 $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $(LIBOPT) $(LFLAGS) $(LIBSOPT) \
77 $(OCAMLC) $(OCAMLFLAGS) -a -o $(LIB) $(LFLAGS) $(LIBS) $(OBJS)
81 $(OCAMLC) $(INCLUDES) -c $(DOCS)
82 ocamldoc $(INCLUDES) -html -d doc $(DOCS)
83 ocamldoc $(INCLUDES) -dot -o doc/dependencies.out $(DOCS)
86 $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend