
Contents | Parent Topic | Previous Topic | Next Topic
This chapter will describe how to install SCAM. For experienced people this will not be hard, but it is recommened to read this anyway.
On a UNIX system or another system that uses make, follow the section Compiling With Make, and if you do not use make, but a fancy programming environment (FPE), follow the section Compiling Without Make. After compilation you can set up The SCAM Perl Front-end.
Create a new project in your FPE. Let your project include the files in the rascal and the src directory. If you will use SIO, include the files sio.h, sio.c, slog.h and slog.c.
You have to make sure the files from sio are patched. How to do this is explained in Hacking source code.
Also make sure the right preprocessor variables are defined, especially if you are using SIO.
Finally, you may want to edit some values in config.h, for example some device names.
Go to the src directory and edit the Makefile. Set the right variables to the right values as explained in the Makefile. If you want to use SIO, make sure that the line where USE_SIO is defined is uncommented and that all sio-related variables are correct.
Be sure that the RASCAL variable is set correctly, not to the directory that contains the rascal source files (which should have the name rascal), but to its parent.
You have to make sure the files from SIO are patched. How to do this is explained in Hacking source code.
You may also want to edit some values in config.h, for example some device names.
Now type make distclean followed by make:
~/scam/rascal $ cd ../src ~/scam/src $ make distclean ; make
SCAM will compile now, please ignore any warnings. After compilation you can strip the executable:
~/scam/src $ make strip
This will reduce the executable's size significantly.
Now you can put the executable wherever you want:
~/scam/src $ mv scam .. ~/scam/src $ cd .. ~/scam $
You may want to edit several options (such as a default reader and devices) in config.h.
If you have an old version of SIO, you will have to apply a little patch by hand or upgrade to a version of sio that is patched. To patch sio, edit the files slog.h and slog.c and replace all occurrences of the word private with priv. private is a reserved word in C++ and the C++ compiler will detect an error.
If you want to use the front-end a few files have to be created first. With a little luck, the files already exist and you can skip this section.
Create two named pipes, called scam_err and scam_out:
~/scam $ mkfifo scam_err ~/scam $ mkfifo scam_out
If you do not have mkfifo, try mknod -p. If you are on a system that does not have fifos or named pipes (such as Windows) you cannot use the front-end. I realize this is a bad design choice, and if you insist on using a platform that does not have named pipes there are a number of solutions, but I do not have the time or the experience to realize them.