--------------------------------------------------------------------- Copyright (C) 1993 Christian-Albrechts-Universitaet zu Kiel, Germany --------------------------------------------------------------------- Projekt : APPLY - A Practicable And Portable Lisp Implementation ------------------------------------------------------ Funktion : Installation notes for CLiCC $Revision: 1.6 $ $Id: INSTALL,v 1.6 1993/07/30 14:25:03 uho Exp $ --------------------------------------------------------------------- This file describes the system requirements and the installation procedure for the CLiCC Common Lisp to C compiler. See the files README and COPYRIGHT for further information. See also the files src/compiler/README and lib/README to get information about how to use CLiCC. After installation you should apply CLiCC to our test suite in src/test. Look at src/test/README for details. --------------------------------------------------------------------- 0. Requirements ~~~~~~~~~~~~ First of all note that you need a Common Lisp system to boot CLiCC. You also need a C compiler available on your target system, i.e. the machine on which you want to run the executables. This machine might be but of course needs not to be the same as your development system, i.e. the machine on which you want to run CLiCC. At present we recommend to use CLiCC within a Common Lisp system, although you might compile CLiCC to C as well, and then use it as an application program with command line arguments. It is a known bug that this procedure will not work with Release 0.6.1. We refer to one of the next releases for further information and a fix. The following is a list of Common Lisp systems we tested to be usable for CLiCC to run: - Allegro Common Lisp 4.1 (Franz Inc.) - Sun (Lucid) Common Lisp 4.0 (Sun Microsystems Inc., Lucid Inc.) - CMU Common Lisp 16f (Carnegie Mellon University) - CLISP (Bruno Haible & Michael Stoll) You need an ANSI-C or K&R-C compiler to generate the CLiCC runtime- system library and executables. On PC compatible machines you have to use a 32-bit C compiler, preferably the GNU-C port of DJ Delorie. If you want to use the makefiles contained in our distribution, you will need the GNU Make Utility "gmake". GNU Make is available on ftp.informatik.uni-kiel.de (134.245.15.113) as: /pub/systems/gnu/make-3.68.tar.gz --------------------------------------------------------------------- 1. Installation ~~~~~~~~~~~~ You may leave out steps f) and g), if you want to use the precompiled lisp files of the runtime system. They are part of this distribution, and you will save a lot of time. a) Decide where to locate the CLiCC root directory, further referred to as $CLICCROOT. You need approx. 9 MByte of free disk space available. b) Set the environment variable CLICCROOT to point to this directory. c) Locate your Common Lisp system, further referred to as "lisp". d) Locate your C compiler, further referred to as "yourcc". Edit the files $CLICCROOT/bin/rt and $CLICCROOT/bin/cl . and change the parameters "CC=acc" into "CC=yourcc". e) If you want to use a K&R-C compiler, edit the file $CLICCROOT/src/compiler/config.lisp and change the line (defvar *ANSI-C* T) into (defvar *ANSI-C* NIL) f) Change to the directory $CLICCROOT/src/compiler. g) Start Common Lisp. Load the file "clcload.lisp". Run (compile-clicc) first and then (ask-runtime). Answer "A" and take a cup of tea. ------------------------------------------------------------ At this point you can decide to generate separate files for each runtime system function, which will take quite a lot of installation time, but helps to generate much smaller exe- cutables. If you want to split the runtimesystem, toggle "S)plit" to be "on" before answering "A". ------------------------------------------------------------ h) Run $CLICCROOT/bin/rt to generate the CLiCC runtime libraries $CLICCROOT/lib/rtc.a and $CLICCROOT/lib/rtl.a. Those libraries will be linked with application programs compiled by CLiCC. --------------------------------------------------------------------- 2. Example Dialogue ~~~~~~~~~~~~~~~~ The following shows an example dialogue to install CLiCC, using a shell prompting with "% ", and a Common Lisp system prompting with "cl>": ------------------------------------------------------------------- % mkdir ~/CLiCC % cd ~/CLiCC % setenv CLICCROOT /home/karlo/wg/CLiCC % cd src/compiler % lisp ... cl> (load "clcload.lisp") ; Loading ... ... cl> (compile-clicc) ;;; CLiCC, the Common Lisp to C Compiler --- Version 0.6.1 ;;; Copyright (C) 1993 Christian-Albrechts-Universitaet zu Kiel ... cl> (ask-runtime) A)ll L)isp-module I)nline-module P)rint messages is on S)plit is off O)nly Pass1 is off K)ill C-Files choose: A ;;; Initialize Special Forms ;;; Initialize System Macros ;;; Initialize System Functions ;;; Initialize Evaluator ;;; Syntactic and semantic analysis ;;; File "inline.lisp" ... cl> (exit) % $CLICCROOT/bin/rt acc -I/home/karlo/wg/CLiCC/lib -O -c values.c unix.c system.c symbols.c structure.c string.c progv.c packages.c number.c list.c keysort.c funcall.c foreign.c file.c environ.c debug.c clos.c character.c catch.c array.c ... cp lisp.syntax /home/karlo/wg/CLiCC/lib cp lisp.def /home/karlo/wg/CLiCC/lib cp inline.h lisp.h /home/karlo/wg/CLiCC/lib % -------------------------------------------------------------------