Revision cefc3744
Added by Pierre-Loïc Garoche almost 11 years ago
src/backends/C/c_backend.ml | ||
---|---|---|
28 | 28 |
(* Translation function *) |
29 | 29 |
(********************************************************************************************) |
30 | 30 |
|
31 |
|
|
31 | 32 |
let translate_to_c header_fmt source_fmt makefile_fmt spec_fmt_opt |
32 | 33 |
basename prog machines dependencies = |
33 | 34 |
|
35 |
|
|
36 |
let module HeaderMod = C_backend_header.EmptyMod in |
|
37 |
let module Header = C_backend_header.Main (HeaderMod) in |
|
38 |
|
|
39 |
let module SourceMod = C_backend_src.EmptyMod in |
|
40 |
let module Source = C_backend_src.Main (SourceMod) in |
|
41 |
|
|
42 |
let module MakefileMod = C_backend_makefile.EmptyMod in |
|
43 |
let module Makefile = C_backend_makefile.Main (MakefileMod) in |
|
44 |
|
|
45 |
|
|
34 | 46 |
(* Generating H file *) |
35 |
C_backend_header.print_header header_fmt basename prog machines;
|
|
47 |
Header.print_header header_fmt basename prog machines;
|
|
36 | 48 |
|
37 | 49 |
(* Generating C file *) |
38 |
C_backend_src.print_c source_fmt basename prog machines dependencies;
|
|
50 |
Source.print_c source_fmt basename prog machines dependencies;
|
|
39 | 51 |
|
40 | 52 |
(* Generating Makefile *) |
41 | 53 |
(* If a main node is identified, generate a main target for it *) |
... | ... | |
45 | 57 |
match Machine_code.get_machine_opt main_node machines with |
46 | 58 |
| None -> Format.eprintf "Unable to find a main node named %s@.@?" main_node; |
47 | 59 |
() |
48 |
| Some _ -> C_backend_makefile.print_makefile basename !Options.main_node dependencies makefile_fmt
|
|
60 |
| Some _ -> Makefile.print_makefile basename !Options.main_node dependencies makefile_fmt
|
|
49 | 61 |
) |
50 | 62 |
|
51 | 63 |
(* Local Variables: *) |
Also available in: Unified diff
Specialized the prefix/postfix modifiers through functors arguments
git-svn-id: https://cavale.enseeiht.fr/svn/lustrec/lustre_compiler/branches/cleaner_backend@281 041b043f-8d7c-46b2-b46e-ef0dd855326e