-#\r
-# Translator from Modelica 2.x to flat Modelica\r
-# \r
-# Copyright (C) 2005 - 2007 Imagine S.A.\r
-# For more information or commercial use please contact us at www.amesim.com\r
-# \r
-# This program is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU General Public License\r
-# as published by the Free Software Foundation; either version 2\r
-# of the License, or (at your option) any later version.\r
-# \r
-# This program is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-# GNU General Public License for more details.\r
-# \r
-# You should have received a copy of the GNU General Public License\r
-# along with this program; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
-# \r
-#\r
-\r
-EXE=translator\r
-OCAMLDEP=ocamldep\r
-OCAMLC=ocamlc\r
-OCAMLOPT=ocamlopt\r
-CAMLP4=camlp4\r
-INCLUDES=-I ../parsing -I ../compilation -I ../instantiation -I ../exceptionHandling\r
-\r
-ifeq ($(RELEASE),yes)\r
-OCAMLFLAGS=$(INCLUDES)\r
-else\r
-OCAMLFLAGS=-g $(INCLUDES)\r
-endif\r
-\r
-OCAMLOPTFLAGS=$(INCLUDES)\r
-LIBS=../parsing/parsing.cma ../compilation/compilation.cma \\r
- ../instantiation/instantiation.cma ../exceptionHandling/exceptionHandling.cma \\r
- unix.cma\r
-LIBSOPT=$(LIBS:.cma=.cmxa)\r
-\r
-SRCS=codeGeneration.ml libraryManager.ml versiondate.ml\r
-\r
-\r
-OBJS=$(SRCS:.ml=.cmo)\r
-OBJSOPT=$(SRCS:.ml=.cmx)\r
-\r
-# Avoid problems with svn command\r
-LANG:=C\r
-export LANG\r
-\r
-SVNLASTCHANGEDATESTR:=$(shell svn info .. | grep "Last Changed Date:")\r
-SVNLASTCHANGEREVSTR:=$(shell svn info .. | grep "Last Changed Rev:")\r
-\r
-.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi\r
-\r
-%.cmo: %mlp\r
- $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp)\r
- $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp)\r
- rm -f $(@:.cmo=.tmp)\r
-\r
-%.cmi: %.mpi\r
- $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp)\r
- $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp)\r
- rm -f $(@:.cmi=.tmp)\r
-\r
-%.cmx: %.mlp\r
- $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp)\r
- $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp)\r
- rm -f $(@:.cmx=.tmp)\r
-\r
-%.cmo: %.ml %.cmi\r
- $(OCAMLC) $(OCAMLFLAGS) -c $<\r
-\r
-%.cmi: %.mli\r
- $(OCAMLC) $(OCAMLFLAGS) -c $<\r
-\r
-%.cmx: %.ml\r
- $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $<\r
-\r
-\r
-all: bytecode\r
-\r
-opt: $(OBJSOPT)\r
+#
+# Translator from Modelica 2.x to flat Modelica
+#
+# Copyright (C) 2005 - 2007 Imagine S.A.
+# For more information or commercial use please contact us at www.amesim.com
+#
+# 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.
+#
+#
+
+EXE=translator
+OCAMLDEP=ocamldep
+OCAMLC=ocamlc
+OCAMLOPT=ocamlopt
+CAMLP4=camlp4
+INCLUDES=-I ../parsing -I ../compilation -I ../instantiation -I ../exceptionHandling
+
+ifeq ($(RELEASE),yes)
+OCAMLFLAGS=$(INCLUDES)
+else
+OCAMLFLAGS=-g $(INCLUDES)
+endif
+
+OCAMLOPTFLAGS=$(INCLUDES)
+LIBS=../parsing/parsing.cma ../compilation/compilation.cma \
+ ../instantiation/instantiation.cma ../exceptionHandling/exceptionHandling.cma \
+ unix.cma
+LIBSOPT=$(LIBS:.cma=.cmxa)
+
+SRCS=codeGeneration.ml libraryManager.ml versiondate.ml
+
+
+OBJS=$(SRCS:.ml=.cmo)
+OBJSOPT=$(SRCS:.ml=.cmx)
+
+# Avoid problems with svn command
+LANG:=C
+export LANG
+
+SVNLASTCHANGEDATESTR:=$(shell svn info .. | grep "Last Changed Date:")
+SVNLASTCHANGEREVSTR:=$(shell svn info .. | grep "Last Changed Rev:")
+
+.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi
+
+%.cmo: %mlp
+ $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp)
+ $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp)
+ rm -f $(@:.cmo=.tmp)
+
+%.cmi: %.mpi
+ $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp)
+ $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp)
+ rm -f $(@:.cmi=.tmp)
+
+%.cmx: %.mlp
+ $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp)
+ $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp)
+ rm -f $(@:.cmx=.tmp)
+
+%.cmo: %.ml %.cmi
+ $(OCAMLC) $(OCAMLFLAGS) -c $<
+
+%.cmi: %.mli
+ $(OCAMLC) $(OCAMLFLAGS) -c $<
+
+%.cmx: %.ml
+ $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $<
+
+
+all: bytecode
+
+opt: $(OBJSOPT)
$(OCAMLOPT) -verbose $(OCAMLOPTFLAGS) -o $(EXE) $(LFLAGS) $(LIBSOPT) $(OBJSOPT) translator.ml
cp $(EXE) ../../../
rm -f $(EXE)
-\r
-bytecode: $(OBJS)\r
- $(OCAMLC) $(OCAMLFLAGS) -o $(EXE) $(LFLAGS) $(LIBS) $(OBJS) translator.ml\r
-\r
-custom: $(OBJS)\r
- $(OCAMLC) -verbose -custom $(OCAMLFLAGS) -o $(EXE) $(LFLAGS) $(LIBS) $(OBJS) translator.ml \r
-\r
-depend: version $(SRCS)\r
- $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend\r
-\r
-versiontarget : \r
-ifeq ("$(strip $(SVNLASTCHANGEDATESTR))", "")\r
-ifeq ("$(strip $(wildcard versiondate.ml))", "")\r
- @echo "***********************************************"\r
- @echo "*** Could not expand the SVN version date *****"\r
- @echo "*** using the template file as it is *****"\r
- @echo "*** The build date will not be correct *****"\r
- @echo "***********************************************"\r
- cp -p versiondate.ml.tmpl versiondate.ml\r
-else\r
- @echo "***********************************************"\r
- @echo "*** Reusing existing versiondate.ml ******"\r
- @echo "***********************************************"\r
-endif\r
-else\r
- sed -e '/let/s/AUTO_UPDATE_DATE/$(SVNLASTCHANGEDATESTR)/' -e '/let/s/AUTO_UPDATE_REV/$(SVNLASTCHANGEREVSTR)/' < versiondate.ml.tmpl > versiondate.ml\r
-endif\r
-\r
-version:\r
- $(MAKE) versiontarget\r
-\r
-versiondate.ml: $(filter-out versiondate.ml, $(SRCS))\r
- $(MAKE) versiontarget\r
-\r
--include .depend\r
-\r
-clean:\r
- rm -f *.cmxa\r
- rm -f *.cm[aiox]\r
- rm -f *.o\r
- rm -f *.obj\r
+
+bytecode: $(OBJS)
+ $(OCAMLC) $(OCAMLFLAGS) -o $(EXE) $(LFLAGS) $(LIBS) $(OBJS) translator.ml
+
+custom: $(OBJS)
+ $(OCAMLC) -verbose -custom $(OCAMLFLAGS) -o $(EXE) $(LFLAGS) $(LIBS) $(OBJS) translator.ml
+
+depend: version $(SRCS)
+ $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend
+
+versiontarget :
+ifeq ("$(strip $(SVNLASTCHANGEDATESTR))", "")
+ifeq ("$(strip $(wildcard versiondate.ml))", "")
+ @echo "***********************************************"
+ @echo "*** Could not expand the SVN version date *****"
+ @echo "*** using the template file as it is *****"
+ @echo "*** The build date will not be correct *****"
+ @echo "***********************************************"
+ cp -p versiondate.ml.tmpl versiondate.ml
+else
+ @echo "***********************************************"
+ @echo "*** Reusing existing versiondate.ml ******"
+ @echo "***********************************************"
+endif
+else
+ sed -e '/let/s/AUTO_UPDATE_DATE/$(SVNLASTCHANGEDATESTR)/' -e '/let/s/AUTO_UPDATE_REV/$(SVNLASTCHANGEREVSTR)/' < versiondate.ml.tmpl > versiondate.ml
+endif
+
+version:
+ $(MAKE) versiontarget
+
+versiondate.ml: $(filter-out versiondate.ml, $(SRCS))
+ $(MAKE) versiontarget
+
+-include .depend
+
+clean:
+ rm -f *.cmxa
+ rm -f *.cm[aiox]
+ rm -f *.o
+ rm -f *.obj
rm -f $(EXE)
- rm -f *~\r
+ rm -f *~