Unix Compilation

You can compile either a debug version or a production version of your gateway, as shown in the following sections. The compiler creates the _ssol26 (production) and _ssol26d (debug) directories. After compiling in both production and debug modes, the source directory, where install_dir is the directory in which K2 is installed, looks as follows:

ls /install_dir/k2/samples/client/c/GDK/vgwsamp/src
-rwxr-xr-x 1 user 3426 Mar 20 12:23 Makefile
drwxr-xr-x 2 user 512 Mar 22 17:28 _ssol26
drwxr-xr-x 2 user 512 Mar 22 17:29 _ssol26d
-rwxr-xr-x 1 user 3230 Feb 22 20:08 sampdef.h
-rwxr-xr-x 1 user 28293 Feb 21 19:55 sampfunc.c
-rwxr-xr-x 1 user 2683 Feb 21 13:35 sampfunc.h
-rwxr-xr-x 1 user 1588 Feb 5 13:55 vgwmsg.h
-rwxr-xr-x 1 user 76188 Feb 22 19:41 vgwsamp.c
-rwxr-xr-x 1 user 6204 Feb 22 20:08 vgwsamp.dsp
-rwxr-xr-x 1 user 537 Sep 11 2001 vgwsamp.dsw
-rwxr-xr-x 1 user 7022 Feb 22 20:08 vgwsamp.h
-rwxr-xr-x 1 user 7764 Feb 20 13:23 vgwsamp.mak
-rwxr-xr-x 1 user 62976 Feb 28 14:51 vgwsamp.opt

Production Version

To compile the production version, change to the directory that contains your source files, remove old directories, and execute the make command for the _ssol26 platform. The following command compiles the sample gateway in production mode:

rm -rf _ssol26
make _ssol26

Debug Version

To compile the debug version, change to the directory that contains your source files, remove old directories, and execute the make command for the _ssol26d platform. The following command compiles the sample gateway in debug mode:

rm -rf _ssol26d
make _ssol26d