This document should be used in conjunction with the main documentation.
This is all portable 32 bit C code.
The source has recently been compiled on OS/2 using VisualAge C++ 3.0 (with CTC306, CTD302 and CTU304), Win32 using Visual C++ 4.2, 32 bit DOS using Watcom C/C++ 10.6 + CauseWay 1.3, AIX using xlc, and Linux using gcc 2.7.2.3.
It should port to any modern 32 bit platform easily enough.
When you unzip the source package, you get a directory full of platform independant source files, and a few subdirectories containing platform dependant files. So your first step before building should be to copy the appropriate subdirectory into the main directory. eg: when building OS2
copy os2 nmake
The platform dependant files are basically just makefile
s, and
the configuration file for the JPEG source.
The UNIX makefile
supports a variety of different UNIXes. By
default it supports Linux, but can be made to work on other UNIXes such as AIX,
HP-UX and SunOS by invoking GNU make with a macro defined. eg: to make for HP-UX
:-
make HP=1
On platforms which don't support ifdef
etc. in their make
programs (like GNU make does), you can use my Make Pre-Processor script, called
mpp
, to produce a suitable makefile
. mpp
is just a little awk
script which evaluates ifdef
s. It
is available from my home page. eg:
mpp makefile HP > makefile.HP make -f makefile.HP
To build with JPEG support, you need the Independant JPEG Groups library version 6a installed in a directory somewhere.
You then edit/check that the makefile you are using references this directory
correctly. There is a make variable called IJG
which must point to
the correct directory. On UNIX, use of this directory is indicated by passing
JPEG=1 to make. On PCs, you uncomment the IJG
definition to make it
active.
When building with JPEG support, the build process works by copying a shrunk
down makefile
called makeijgo
to wherever the IJG 6a
is installed, and also a configuration file. It then builds the library using
compiler switches suitable for building objects which are to be a part of the
main GBM library.
So, to build GBM for AIX, with JPEG support, assuming that IJG points to a
suitable directory, remembering that vanilla make
on AIX doesn't
support ifdef
:-
mpp makefile AIX JPEG > makefile.AIX make -f makefile.AIX