Project

General

Profile

« Previous | Next » 

Revision d0f26f04

Added by LĂ©lio Brun 7 months ago

corrections for stateless nodes

View differences:

src/backends/C/c_backend.ml
41 41
    ( print_alloc_header,
42 42
      print_lib_c,
43 43
      print_main_c,
44
      print_makefile,
45
      preprocess
44
      print_makefile
46 45
    (* , print_cmake *) ) basename prog machines dependencies =
47 46
  let destname = !Options.dest_dir ^ "/" ^ basename in
48 47

  
49
  let machines, spec = preprocess machines in
50

  
51 48
  (* Generating H alloc file *)
52 49
  let alloc_header_file = destname ^ "_alloc.h" in
53 50
  (* Could be changed *)
54 51
  with_out_file alloc_header_file (fun header_fmt ->
55
      print_alloc_header header_fmt basename prog machines dependencies spec);
52
      print_alloc_header header_fmt basename machines dependencies);
56 53

  
57 54
  (* Generating Lib C file *)
58 55
  let source_lib_file = c_or_cpp destname in
......
124 121
      Header.print_header_from_header header_fmt basename lusic.contents)
125 122

  
126 123
let translate_to_c generate_c_header basename prog machines dependencies =
127
  let header_m, source_m, source_main_m, makefile_m, preprocess =
124
  let header_m, source_m, source_main_m, makefile_m =
128 125
    match !Options.spec with
129 126
    | "no" ->
130 127
      ( C_backend_header.((module EmptyMod : MODIFIERS_HDR)),
131 128
        C_backend_src.((module EmptyMod : MODIFIERS_SRC)),
132 129
        C_backend_main.((module EmptyMod : MODIFIERS_MAINSRC)),
133
        C_backend_makefile.((module EmptyMod : MODIFIERS_MKF)),
134
        fun m -> m, [] )
130
        C_backend_makefile.((module EmptyMod : MODIFIERS_MKF)) )
135 131
    | "acsl" ->
136 132
      let open C_backend_spec in
137 133
      ( C_backend_header.((module HdrMod : MODIFIERS_HDR)),
138 134
        C_backend_src.((module SrcMod : MODIFIERS_SRC)),
139 135
        C_backend_main.((module EmptyMod : MODIFIERS_MAINSRC)),
140
        C_backend_makefile.((module MakefileMod : MODIFIERS_MKF)),
141
        preprocess_acsl )
136
        C_backend_makefile.((module MakefileMod : MODIFIERS_MKF)) )
142 137
    | "c" ->
143 138
      assert false (* not implemented yet *)
144 139
    | _ ->
......
153 148
    ( Header.print_alloc_header,
154 149
      Source.print_lib_c,
155 150
      SourceMain.print_main_c,
156
      Makefile.print_makefile,
157
      preprocess )
151
      Makefile.print_makefile )
158 152
    (* CMakefile.print_makefile *)
159 153
  in
160 154
  if generate_c_header then print_c_header basename;

Also available in: Unified diff