Compiling on a UNIX™ operating system
About this task
On UNIX™ operating systems, you use the generic ProjectU.mak makefile. This makefile includes platform-specific makefiles as files named makeinc.platform. To specify the UNIX™ operating system, set the TARGET environment variable to the path and file name of the include file for your operating system. Platform-specific files are located in the directory $INFORMIXDIR/incl/dbdk.
The makefile requires the INFORMIXDIR environment variable to be set to the HCL Informix® database server installation directory. The BINDIR variable in the makefile determines where the shared object file or dynamic link library is written.
BladeSmith creates server, all, and clean targets
in the makefile. The server target builds the shared object
file. The clean target deletes the shared object file or dynamic
link library. The default all target is equivalent to the server target.
Important: Generate code in BladeSmith with the Format property
set to UNIX™. If you generate
code for a UNIX™ DataBlade® module
with the DOS file format, you must convert the files to UNIX™ format before compiling.
To compile and link your DataBlade® module shared object file:
Procedure
- Copy the generated src/c directory and all of its contents to your UNIX™ machine.
- To compile and link shared objects on a Sun Solaris 2.5
computer with the SPARC compiler, execute the following command at
the C shell:
setenv TARGET $INFORMIXDIR/incl/dbdk/makeinc.solaris make -f ProjectU.mak
Results
The project.bld file is created in the src/solaris-sparc directory.
Important: For compiling information specific to your operating
system, see your machine notes.