# Compiling GBM and GBM PM-Tools

GBM.DLL, the GBM command line tools, GBMV, GBMV2, GBMDLG, GBMLOGO and GBMVFSA can be built for OS/2 (and eComStation) using the following compilers:

- IBM Visual Age C++ 3.08 (commercial)
- Open Watcom 1.4, 1.5, 1.6 or 1.7 (Open Source)

Additional stuff required:

- IPFCPREP (IBM Employee Written Software) for preparing the online help of GBMV2 and GBMDLG for the IBM help compiler. It's free, get it for instance from here. Put it somewhere in your PATH.
- IBM Developer's Toolkit for OS/2 (tested with versions 4.5x). If you have a license for Warp 4.5x or eComStation, you'll find it on the product CD.

Optional tools:

- LX-Lite 1.3.3 for OS/2 to (re)compress the binaries. Get it from Hobbes.
- Infozip ZIP for OS/2 for packaging the binaries. Get it from the developers page.
- WarpIN 1.0.14 or higher to create an installable archive. Get it from Netlabs.
  The packaging script for WarpIN's wic.exe is available on request.

Unzip the source package into an empty directory. Ensure that the listed requirements are fulfilled. The environment for the chosen compiler must be active in the shell to be used for compiling.

Have look at the file `readme.build` in the root directory of the source archive. It explains again how to compile.

General steps:

1. First set path to lxlite executable/dll compressor in nmake.opt if you want to compress all EXEs and DLLs.

2. Building with IBM Visual Age C++ 3.08:

   - IBM VAC++ 3.08 must be installed and all environment variables should be set correctly before starting nmake.
   - `nmake /f makefile.vac`
     (Other supported targets: all, clean, clobber, exepack, install, package)

3. Building with Open Watcom 1.4, 1.5, 1.6 or 1.7:

   - Open Watcom must be installed and all environment variables should be set correctly before starting wmake. The provided makefiles are in nmake style but you can use wmake's nmake compatibility mode.
   - `wmake -ms -h -f makefile.wat`
     (Other supported targets: all, clean, clobber, exepack, install, package)

Debug compile can be activated by specifying the parameter `debug=on` to the nmake or wmake call.

Note:
You can build all sources at once by starting nmake/wmake in the root directory of the source archive.

Note:
The created import library for GBM.DLL can be used with any other OS/2 compiler/linker. Beware that the utility archive libraries are compiler dependent and thus can only be linked with the compiler that created them.