Step 4: Compile and Link the Program
Encina applications are generally compiled using standard UNIX makefiles. For details, refer to the Encina Monitor Programmer's Guide. To build application servers that use Ingres Embedded SQL, you must modify the makefiles.
To modify the makefiles
1. Add the following lines to precompile your embedded SQL source into C source.
sourcefile.c: sourcefile.sc
$(II_SYSTEM)/ingres/bin/esqlc sourcefile.sc
2. Add $II_SYSTEM/ingres/files to the header file list specified for the cc command's -I flag.
3. Add $II_SYSTEM/ingres/lib/libingres.a to the end of the list of Encina libraries. For example, in the Encina TPM demo “Makefile,” this list is specified by the variable SYS_LIBS.