C-PLOT

Scientific Graphics and Data Analysis

E.1. - Compiling user functions



Normally you run the shell script $CPLOTHOME/bin/makefunc from the function directory to compile your user functions. That file usually invokes the C compiler to compile your module and link it with the appropriate overhead modules. If your user function contains the string cplot_compile: followed by commands to compile your function, those commands are used instead of the default commands from makefunc. The commands can refer to the make utility or invoke the C compiler directly. Possible ways of including the information in a function source file are:
/*
*    cplot_compile:  make my_func.5
*/
or
#if 0
    cplot_compile:  make my_func.5
#endif


Accessing and modifying the data structure passed to and from the plot program is simplified by a set of macros that is brought into your program with the line of code,
#include <p_funct.h>
This include file also includes another, p_plot.h, that describes the above-mentioned data structure. Both include files are found in the directory $CPLOTHOME/include.