GPL + CeCILL Header change
[scilab.git] / scilab / modules / scicos / src / translator / makefile.mak
1 #  Scicos
2 #
3 #  Copyright (C) DIGITEO - 2010 - Allan CORNET
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 #
19 # See the file ./license.txt
20
21 !IF "$(OCAMLLIB)" == ""
22 OCAMLPATH=C:\Program Files\Objective Caml
23 !ELSE
24 OCAMLPATH=$(OCAMLLIB)\..
25 !ENDIF
26
27 OCAMLPATHBIN=$(OCAMLPATH)\bin
28 OCAMLPATHLIB=$(OCAMLPATH)\lib
29 OCAMLC=ocamlc
30 OCAMLOPT=ocamlopt
31 OCAMLDEP=ocamldep
32 CAMLP4=camlp4
33 OCAMLYACC=ocamlyacc
34 OCAMLLEX=ocamllex
35 RM=del
36 EXEC=modelicat.exe
37 INCLUDEPATHS=-I ./compilation -I ./exceptionHandling -I ./parsing -I ./instantiation -I ./translation
38
39 all::
40         $(OCAMLYACC) parsing/parser.mly
41         $(RM) parsing\parser.mli
42         $(OCAMLLEX) parsing/lexer.mll
43         $(OCAMLC) $(INCLUDEPATHS) -c parsing/syntax.ml parsing/parser.ml
44         $(OCAMLC) $(INCLUDEPATHS) -c parsing/parser.ml parsing/lexer.ml
45         $(OCAMLC) $(INCLUDEPATHS) -c parsing/lexer.ml parsing/linenum.ml
46         $(OCAMLC) $(INCLUDEPATHS) -c parsing/linenum.ml compilation/types.ml
47         $(OCAMLC) $(INCLUDEPATHS) -c compilation/types.ml compilation/nameResolve.ml
48         $(OCAMLC) $(INCLUDEPATHS) -c compilation/nameResolve.ml instantiation/instantiation.ml
49         $(OCAMLC) $(INCLUDEPATHS) -c instantiation/instantiation.ml exceptionHandling/msgDico.ml
50         $(OCAMLC) $(INCLUDEPATHS) -c exceptionHandling/msgDico.ml exceptionHandling/errorDico.ml
51         $(OCAMLC) $(INCLUDEPATHS) -c exceptionHandling/errorDico.ml exceptionHandling/exceptHandler.ml
52         $(OCAMLC) $(INCLUDEPATHS) -c exceptionHandling/exceptHandler.ml translation/libraryManager.ml
53         $(OCAMLC) $(INCLUDEPATHS) -c translation/libraryManager.ml translation/codeGeneration.ml
54         $(OCAMLC) $(INCLUDEPATHS) -c translation/codeGeneration.ml 
55         $(OCAMLC) $(INCLUDEPATHS) -c translation/versiondate.ml translation/translator.ml
56         $(OCAMLC) $(INCLUDEPATHS) -c translation/translator.ml parsing/syntax.ml
57         $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/syntax.ml parsing/parser.ml
58         $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/parser.ml parsing/lexer.ml
59         $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/lexer.ml parsing/linenum.ml
60         $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/linenum.ml compilation/types.ml
61         $(OCAMLOPT) $(INCLUDEPATHS) -c compilation/types.ml compilation/nameResolve.ml
62         $(OCAMLOPT) $(INCLUDEPATHS) -c compilation/nameResolve.ml instantiation/instantiation.ml
63         $(OCAMLOPT) $(INCLUDEPATHS) -c instantiation/instantiation.ml exceptionHandling/msgDico.ml
64         $(OCAMLOPT) $(INCLUDEPATHS) -c exceptionHandling/msgDico.ml exceptionHandling/errorDico.ml
65         $(OCAMLOPT) $(INCLUDEPATHS) -c exceptionHandling/errorDico.ml exceptionHandling/exceptHandler.ml
66         $(OCAMLOPT) $(INCLUDEPATHS) -c exceptionHandling/exceptHandler.ml translation/libraryManager.ml
67         $(OCAMLOPT) $(INCLUDEPATHS) -c translation/libraryManager.ml translation/codeGeneration.ml
68         $(OCAMLOPT) $(INCLUDEPATHS) -c translation/codeGeneration.ml 
69         $(OCAMLOPT) $(INCLUDEPATHS) -c translation/versiondate.ml translation/translator.ml
70         $(OCAMLOPT) $(INCLUDEPATHS) -c translation/translator.ml
71         $(OCAMLOPT) -o $(EXEC) $(INCLUDEPATHS) nums.cmxa ./parsing/syntax.cmx ./parsing/parser.cmx \
72             ./parsing/lexer.cmx ./parsing/linenum.cmx ./compilation/types.cmx ./compilation/nameResolve.cmx \
73             ./instantiation/instantiation.cmx ./exceptionHandling/msgDico.cmx ./exceptionHandling/errorDico.cmx \
74             ./exceptionHandling/exceptHandler.cmx ./translation/libraryManager.cmx ./translation/codeGeneration.cmx \
75             ./translation/versiondate.cmx ./translation/translator.cmx 
76         @copy $(EXEC) ..\..\..\..\bin\$(EXEC)
77         $(RM) parsing\parser.ml
78         $(RM) parsing\lexer.ml
79 clean::
80         @-del /s *.cmi
81         @-del /s *.cmo
82         @-del /s *.cmx
83         @-del /s *.cma
84         @-del /s *.obj
85         @-del $(EXEC)
86         
87 distclean::
88         @-del /s *.cmi
89         @-del /s *.cmo
90         @-del /s *.cmx
91         @-del /s *.cma
92         @-del /s *.obj
93         @-del $(EXEC)
94         @-del ..\..\..\..\bin\$(EXEC)