To unpack C[] compiler sources, type the following shell commands:
gunzip cbc-2.0.1.tar.gz
tar -xvf cbc-2.0.1.tar
The above commands create the directory cbc-2.0.1 and
unpack sources to it. Now type from a command prompt:
cd cbc-2.0.1
Building the C[] compiler consists of two steps: firstly edit makefile. Secondly compile all the programs.
Editing Makefile Open Makefile in the root C[] compiler distribution
directory ( cbc-2.0.1 ) with any text editor. Now properly
set up the folowing Makefile variables:
gcc is recomended on all platforms other
then HP. On HP c89 should be used.
cpp is strongly recomended. For
example on one of our computers the variable CPPDIR is set to
/export/home/local/lib/gcc-lib/sparc-sun-solaris2.4/2.7.2.f.1.
It is very important to avoid extra spaces at the end of the string
value of this variable.
Type
make
from a command prompt. The cbc
command line compiler and cbcc
compiler driver will be automatically built.
To install C[] compiler type from a command prompt:
make install
The installation procedure creates the C[] compiler root
installation directory according to the value of CBCHOME Makefile
variable. Then bin, man and h subdirectories of the root install
directory are created and all necessary files are copied to these
directories. The bin contains
the cbc command line compiler and
the cbcc compiler driver. The h directory contains headers which
are always included into output C files (see The C[] Compiler User's Guide for
details).