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.
32 MLS=xMLTree.ml linenum.ml stringParser.ml stringLexer.ml xMLParser.ml xMLLexer.ml\
33 modelicaCodeGenerator.ml xML2Modelica.ml
35 PLATFORM=$(shell uname -s)
36 EXE=../../XML2Modelica
38 .SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi
42 $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $(<) > $(@:.cmo=.tmp)
43 $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp)
47 $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $(<) > $(@:.cmi=.tmp)
48 $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp)
52 $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $(<) > $(@:.cmx=.tmp)
53 $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp)
57 $(OCAMLC) $(OCAMLFLAGS) -c $(<)
60 $(OCAMLC) $(OCAMLFLAGS) -c $(<)
63 $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $(<)
75 opt: $(MLIS:.mli=.cmi) $(MLS:.ml=.cmx)
76 ocamlopt $(OCAMLOPTFLAGS) -o $(EXE) $(LFLAGS) $(LIBS:.cma=.cmxa) $(MLS:.ml=.cmx)
78 bytecode: $(MLIS:.mli=.cmi) $(MLS:.ml=.cmo)
79 ocamlc $(OCAMLFLAGS) -o $(EXE) $(LFLAGS) $(LIBS) $(MLS:.ml=.cmo)
84 prof: OCAMLOPTFLAGS+=-p
87 depend: $(MLS) $(MLIS)
89 ocamldep $(MLS) $(MLIS) > .depend
99 rm -f stringParser.mli
100 rm -f stringLexer.mli