Project

General

Profile

« Previous | Next » 

Revision 2dd3d358

Added by Teme Kahsai about 5 years ago

making library statically link to horn backend

View differences:

src/backends/C/c_backend.ml
29 29
  let destname = !Options.dest_dir ^ "/" ^ basename in
30 30
  let source_main_file = destname ^ "_main.c" in (* Could be changed *)
31 31
  let makefile_file = destname ^ ".makefile" in (* Could be changed *)
32
  
32

  
33 33
  let print_header, print_lib_c, print_main_c, print_makefile = funs in
34 34

  
35 35
  (* Generating H file *)
......
38 38
  let header_fmt = formatter_of_out_channel header_out in
39 39
  print_header header_fmt basename prog machines dependencies;
40 40
  close_out header_out;
41
  
41

  
42 42
  (* Generating Lib C file *)
43 43
  let source_lib_file = destname ^ ".c" in (* Could be changed *)
44 44
  let source_lib_out = open_out source_lib_file in
......
63 63

  
64 64
      (* Generating Main C file *)
65 65
      print_main_c source_main_fmt m basename prog machines dependencies;
66
      
66

  
67 67
      (* Generating Makefile *)
68 68
      print_makefile basename main_node dependencies makefile_fmt;
69 69

  
......
86 86
    let module SourceMain = C_backend_main.Main (SourceMainMod) in
87 87
    let module Makefile = C_backend_makefile.Main (MakefileMod) in
88 88

  
89
    let funs = 
90
      Header.print_alloc_header, 
91
      Source.print_lib_c, 
92
      SourceMain.print_main_c, 
93
      Makefile.print_makefile 
89
    let funs =
90
      Header.print_alloc_header,
91
      Source.print_lib_c,
92
      SourceMain.print_main_c,
93
      Makefile.print_makefile
94 94
    in
95
    gen_files funs basename prog machines dependencies 
95
    gen_files funs basename prog machines dependencies
96 96

  
97 97
  end
98 98
  | "acsl" -> begin
......
107 107
    let module SourceMain = C_backend_main.Main (SourceMainMod) in
108 108
    let module Makefile = C_backend_makefile.Main (MakefileMod) in
109 109

  
110
    let funs = 
111
      Header.print_alloc_header, 
110
    let funs =
111
      Header.print_alloc_header,
112 112
      Source.print_lib_c,
113 113
      SourceMain.print_main_c,
114
      Makefile.print_makefile 
114
      Makefile.print_makefile
115 115
    in
116
    gen_files funs basename prog machines dependencies 
116
    gen_files funs basename prog machines dependencies
117 117

  
118 118
  end
119 119
  | "c" -> begin

Also available in: Unified diff