On all systems we've created an EMU library that is then used to compile applications in a very convenient way.
The dynamic EMU library, libemu, is located under /oc7/emu/toolbox. To compile an application, the path to
this library must be specified explicitly. To make this easier the alias gccemu has been created (currently
found only in Emilio's .cshrc file), which is defined as follows:
alias gccemu 'gcc -o \!* \!*.c -DUNIX -lm -lnetcdf -L/oc7/emu/toolbox -R/oc7/emu/toolbox -lemu'
The GNU compiler, gcc, is used.
Example:
To compile the application myemuapp.c (with no header file) found in your current directory, use:
gccemu myemuapp
An executable called myemuapp will be created in your current directory (of course, you can change the name of this executable using mv)
Using the alias emulib, we create a dynamic library. This alias (currently found only in Emilio's
.cshrc file) executes the following line:
gcc -o libemu.so -G function.c io.c util.c masks.c ncoutput.c -DUNIX -lm -lnetcdf
libemu is the EMU library, and currently it is located under /oc7/emu/toolbox. The GNU compiler, gcc, is used.
The last step (which is done just once) is to add the header files to the default include path.
This is done through soft links:
ln -s /oc7/emu/toolbox/emu.h /usr/include/emu.h
ln -s /oc7/emu/toolbox/unitconv.h /usr/include/unitconv.h
Emilio Mayorga, emiliom@u.washington.edu |