- Choose the destination directory for the binaries, and add it to the your console's rc file (
.bashrcor equivalent):- Add the following line to your file:
export LCCDIR=~/lcc. Then restart the terminal. - I recommend
~/lcc, but other directories can also be used, as long as they don't require root permissions.
- Add the following line to your file:
- Create the destination directory:
mkdir $LCCDIR. - Make sure that all
.mdfiles use LF line termination instead of CLRF. Git will sometimes convert all line endings to CLRF automatically. - Run
make all. The compiler should finish without warnings or errors. - (Recommended) Create an alias (add to
.bashrcor equivalent):alias lcc="$LCCDIR/lcc". - (Recommended) Copy the custom headers to the destination directory:
cp -rT include $LCCDIR/include. - (Optional) Update the manfiles
sudo cp doc/*.1 /usr/local/man/man1(you may need tosudo mkdir /usr/local/man/man1first).
Some possible errors:
- Several errors like
line 1: invalid character '%': Make sure that all.mdfiles use LF line termination. - Errors when compiling
gram.c: Make sure it's not been automatically overwritten. Downloadlburg/gram.cagain from GitHub if needed.
Once the alias has been created, lcc can be executed just by typing lcc. Using lcc is similar to using gcc, and you can learn about the supported options by executing lcc without arguments.
It should be noted that, on the CESC16 architecture, all data types (char, int, ...) are exactly the same size (16 bits).
This hierarchy is the distribution for lcc version 4.2.
lcc version 3.x is described in the book "A Retargetable C Compiler:
Design and Implementation" (Addison-Wesley, 1995, ISBN 0-8053-1670-1).
There are significant differences between 3.x and 4.x, most notably in
the intermediate code. For details, see
http://storage.webhop.net/documents/interface4.pdf.
VERSION 4.2 IS INCOMPATIBLE WITH EARLIER VERSIONS OF LCC. DO NOT
UNLOAD THIS DISTRIBUTION ON TOP OF A 3.X DISTRIBUTION.
LOG describes the changes since the last release.
CPYRIGHT describes the conditions under you can use, copy, modify, and
distribute lcc or works derived from lcc.
doc/install.html is an HTML file that gives a complete description of
the distribution and installation instructions.
Chris Fraser / [email protected]
David Hanson / [email protected]
$Revision$ $Date$