To bootstrap/install C2C the following tools are needed:
- gcc
- make
The fastest way to just get c2c up and running is just following the next steps. The explanation of what that does is below.
cd
mkdir ~/bin
ln -s ~/code/c2c_native/output/c2c/c2c ~/bin/c2c
ln -s ~/code/c2c_native/output/c2tags/c2tags ~/bin/c2tags
mkdir code
git clone [email protected]:c2lang/c2_libs.git
git clone [email protected]:c2lang/c2c_native.git
cd c2c_native
. ./env.sh
make -C bootstrap
./install_plugins.sh
c2c
./output/tester/tester test
To be usable, c2c needs to be in your $PATH. This is done above by adding it to ~/bin. This directory should be in your $PATH, otherwise c2c and c2tags cannot be found.
c2c uses the following enviroment variables:
- C2_LIBDIR - used to find libraries for compilation
- C2_PLUGINDIR - used to find plugins for the compiler
The easiest way to set these is to source env.sh in the c2c_native archive top-level directory.
The install_plugins.sh script simply copies the compiled plugins to ~/c2_plugins.
the bootstrap/ directory contain the C sources of the bootstrap C2 compiler. This must be used because c2c itself is written in C2.