Compiling Programs

CONTROL programs are compiled using special compile scripts. These scripts are usually found in the $CCDIR/script although some subdirectories have their own specialized versions.

The scripts use environment variables to signal the project specific requirements. The scripts noted in Scripts set build specific environment variables.

There are three basic compile scripts:

* co compiles a source file to an object file (for later linking)

* ccc compiles a standalone program (a program that contains it's own main()) and places the executable in the $BIN directory. e.g. ccc braninfo c to create $BIN/braninfo from braninfo*.c

* cv compiles and/or links a program to be linked with an object file in the $MAIN directory and place the executable in the $BIN directory. e.g. cv st ent c to create $BIN/stent from stent*.c

Note that the ccc and cv scripts automatically take care of programs with multiple source files (e.g. steat.c, steat1.c, steat2.c).

In addition, the letters 'm' and 'u' in the script name specify alternate behavior. "u" indicates tat the executable is to be placed in the $UTBIN rather than the $BIN directory. The following combinations result: c+o ccc cv mc+o mccc mcv muccc mucv uccc ucv

For example: uccc tranck c to compile tranck.c and place the executable in $UTBIN directory.

Also the nightly builds use korn shell scripts named build.ksh of which there is one per project directory which will be used to build all the components of that project . These can be called manually and are also called overnight to build the CONTROL suite overnight for all the supported platforms.

The compiler used is the GNU CC compiler. There are issues with older releases that mean that they are built with specific Qt libraries and also built with relevant system libraries. Release '8' builds must be built on the robin server while releases '9' and '10' are built on sam. The Windows releases are built on destiny.