You need the following tools to build CIL:
git clone git://cil.git.sourceforge.net/gitroot/cil/cilThere is also a Github mirror:
git clone git://github.com/kerneis/cil.gitHowever, the Git version may be less stable than the released version. See the Changes section of doc/cil.tex to see what’s changed since the last release. There may be changes that aren’t yet documented in the .tex file or this website.
cd cil
./configure
make
make quicktest
The configure script tries to find appropriate defaults for your system. You can control its actions by passing the following arguments:
CIL requires an underlying C compiler and preprocessor. CIL depends on the underlying compiler and machine for the sizes and alignment of types. The installation procedure for CIL queries the underlying compiler for architecture and compiler dependent configuration parameters, such as the size of a pointer or the particular alignment rules for structure fields. (This means, of course, that you should re-run ./configure when you move CIL to another machine.)
We have tested CIL on the following compilers:
Others have successfully used CIL on x86 processors with Mac OS X, FreeBSD and OpenBSD; on amd64 processors with FreeBSD; on SPARC processors with Solaris; and on PowerPC processors with Mac OS X. If you make any changes to the build system in order to run CIL on your platform, please send us a patch.
Some users might want to build a standalone CIL executable on Windows (an executable that does not require cygwin.dll to run). You will need cygwin for the build process only. Here is how we do it
set OCAMLWIN=C:/Programs/ocaml-win set OCAMLLIB=%OCAMLWIN%/lib set PATH=%OCAMLWIN%/bin;%PATH% set INCLUDE=%INCLUDE%;%OCAMLWIN%/inc set LIB=%LIB%;%OCAMLWIN%/lib;obj/x86_WIN32
The above steps do not build the CIL library, but just the executable. The last step will create a subdirectory TEMP_cil-bindistrib that contains everything that you need to run CIL on another machine. You will have to edit manually some of the files in the bin directory to replace CILHOME. The resulting CIL can be run with ActiveState Perl also.