Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-08-19 16:20:32 -0700 (Fri, 19 Aug 2005)
Revision: 1403
Log message:

      This is some exploration into dynamic linking.  It contains:
         - a parser for C code     parse/C/{Parse,Lex}.om
         - a stub code generator   parse/C/Dll.om
      
      The contrib/gtk directory gives an demo for Gtk (I chose Gtk
      because it has nice header files, and it is sufficiently
      complicated).
      
      I'll write up some docs at some point, but here is the basic idea
      of how a DLL is generated.
      
         1. Parse the C header files.
         2. Extract the declarations.
         3. Generate C stubs for each of the declarations.
         4. Produce a (large) C file that can be compiled
            and then dynamically linked into your OCaml process.
      
      Doing this all from your OMakefile is pretty simple.  Mainly
      you need to specify which functions you want to include
      in your DLL.
      
      This is reasonably independent from omake, so you can use it as
      a generic way to generate wrappers around C functions.
      
      Note that the C file for GTK is perhaps 120k lines of code, so
      you get to stress your C compiler too.
      

Changes  Path
+11 -1 omake-branches/omake_0_9_7_pre5/OMakefile
Properties omake-branches/omake_0_9_7_pre5/contrib/gtk
Added omake-branches/omake_0_9_7_pre5/contrib/gtk/.cvsignore
Properties omake-branches/omake_0_9_7_pre5/contrib/gtk/.cvsignore
Added omake-branches/omake_0_9_7_pre5/contrib/gtk/OMakefile
Properties omake-branches/omake_0_9_7_pre5/contrib/gtk/OMakefile
Added omake-branches/omake_0_9_7_pre5/contrib/gtk/dll.c
Properties omake-branches/omake_0_9_7_pre5/contrib/gtk/dll.c
Added omake-branches/omake_0_9_7_pre5/contrib/gtk/dll.h
Properties omake-branches/omake_0_9_7_pre5/contrib/gtk/dll.h
Added omake-branches/omake_0_9_7_pre5/contrib/gtk/enums.export
Properties omake-branches/omake_0_9_7_pre5/contrib/gtk/enums.export
Added omake-branches/omake_0_9_7_pre5/contrib/gtk/lib.c
Properties omake-branches/omake_0_9_7_pre5/contrib/gtk/lib.c
Added omake-branches/omake_0_9_7_pre5/contrib/gtk/structs.export
Properties omake-branches/omake_0_9_7_pre5/contrib/gtk/structs.export
Added omake-branches/omake_0_9_7_pre5/contrib/gtk/values.export
Properties omake-branches/omake_0_9_7_pre5/contrib/gtk/values.export
+22 -0 omake-branches/omake_0_9_7_pre5/doc/man/omake-base.1
+64 -0 omake-branches/omake_0_9_7_pre5/doc/man/omake-doc.1
+5 -0 omake-branches/omake_0_9_7_pre5/doc/man/omake-pervasives.1
+19 -0 omake-branches/omake_0_9_7_pre5/doc/man/omake-root.1
+18 -0 omake-branches/omake_0_9_7_pre5/doc/man/omake-system.1
+65 -37 omake-branches/omake_0_9_7_pre5/lib/Pervasives.om
+40 -0 omake-branches/omake_0_9_7_pre5/lib/build/C.om
Added omake-branches/omake_0_9_7_pre5/lib/configure/gtk.om
Properties omake-branches/omake_0_9_7_pre5/lib/configure/gtk.om
Properties omake-branches/omake_0_9_7_pre5/lib/parse
Added omake-branches/omake_0_9_7_pre5/lib/parse/.cvsignore
Properties omake-branches/omake_0_9_7_pre5/lib/parse/.cvsignore