C-PLOT

Scientific Graphics and Data Analysis

11.1.5. - How does it work?



For each type of function, a prototype file is copied from $CPLOTHOME/prototypes and given the name you selected. The prototype contains skeleton C subroutines and help information appropriate for the function type you selected. You are then put into your chosen editor. On exiting the editor, the shell script $CPLOTHOME/bin/makefunc is run from the function directory. That file normally 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