The C Compile Command

Keep the build steps explicit.

Review compile-command information. Preserve the required syntax and environment assumptions when building model code.

C Compile Command

C Compile Command

How to change the C compiler ?
How to modify the compiler command and options ?

There is an environment variable set by the CSIM setup file or wrapper (depending on your shell), which specifies the C compiler and compile options to use in building a simulation.

CSIM_C_COMPILER

You can change this by setting it after sourcing setup, or by setting it in your own environment if you use the wrapper/bash.

Example for C-shell:

setenv CSIM_C_COMPILER "gcc out.c $CSIM_ROOT/tools/$MACHINE/clsubs.o -lm"


CSIM PreProcessor Kernel File

There is an environment variable set by the CSIM setup file or wrapper (depending on your shell), which specifies where the CSIM Simulation Kernal is located.

CSIM_KERN_FILE

The CSIM PreProcessor accesses this environment variable to locate the kernel file. The PreProcessor merges your models with the simluation kernel. You can change this by setting it after sourcing setup, or by setting it in your own environment if you use the wrapper/bash.

Example for C-shell:

setenv CSIM_KERN_FILE my_version_of_kernel



This page is an editorial rewrite of source documentation. Historical status, availability, and platform notes are not independently verified for a current release. Technical examples are reference material, not a live simulator.