| 1 | <HTML>
|
|---|
| 2 | <HEAD>
|
|---|
| 3 | <TITLE>Source for Generalised Bitmap Module</TITLE>
|
|---|
| 4 | </HEAD>
|
|---|
| 5 | <BODY>
|
|---|
| 6 |
|
|---|
| 7 | <H1>Source for Generalised Bitmap Module</H1>
|
|---|
| 8 |
|
|---|
| 9 | <P>This document should be used in conjunction with the
|
|---|
| 10 | main <A HREF="gbm.htm">documentation</A>.
|
|---|
| 11 |
|
|---|
| 12 | <!--...sPortability:0:-->
|
|---|
| 13 | <H2>Portability</H2>
|
|---|
| 14 |
|
|---|
| 15 | <P>This is all portable 32 bit C code.
|
|---|
| 16 |
|
|---|
| 17 | <P>The source has recently been compiled on
|
|---|
| 18 | OS/2 using VisualAge C++ 3.0 (with CTC306, CTD302 and CTU304),
|
|---|
| 19 | Win32 using Visual C++ (version 4.0, 4.2, 5.0 and 6.0),
|
|---|
| 20 | 32 bit DOS using Watcom C/C++ version (10.6 and 11.0b) + CauseWay 1.3,
|
|---|
| 21 | AIX using xlc,
|
|---|
| 22 | and Linux using gcc 2.7.2.3 and egcs.
|
|---|
| 23 |
|
|---|
| 24 | <P>It should port to any modern 32 bit platform easily enough.
|
|---|
| 25 | <!--...e-->
|
|---|
| 26 | <!--...sPlatform specific customisation:0:-->
|
|---|
| 27 | <H2>Platform specific customisation</H2>
|
|---|
| 28 |
|
|---|
| 29 | <P>When you unzip the source package, you get a directory full of
|
|---|
| 30 | platform independant source files, and a few subdirectories containing
|
|---|
| 31 | platform dependant files.
|
|---|
| 32 | So your first step before building should be to copy the appropriate
|
|---|
| 33 | subdirectory into the main directory.
|
|---|
| 34 | eg: when building OS2
|
|---|
| 35 |
|
|---|
| 36 | <P>
|
|---|
| 37 | <PRE>
|
|---|
| 38 | copy os2
|
|---|
| 39 | nmake
|
|---|
| 40 | </PRE>
|
|---|
| 41 |
|
|---|
| 42 | <P>The platform dependant files are basically just <CODE>makefile</CODE>s,
|
|---|
| 43 | and the configuration file for the JPEG source.
|
|---|
| 44 |
|
|---|
| 45 | <P>The UNIX <CODE>makefile</CODE> supports a variety of different UNIXes.
|
|---|
| 46 | By default it supports Linux, but can be made to work on other UNIXes
|
|---|
| 47 | such as AIX, HP-UX and SunOS by invoking GNU make with a macro defined.
|
|---|
| 48 | eg: to make for HP-UX :-
|
|---|
| 49 |
|
|---|
| 50 | <P>
|
|---|
| 51 | <PRE>
|
|---|
| 52 | make HP=1
|
|---|
| 53 | </PRE>
|
|---|
| 54 |
|
|---|
| 55 | <P>On platforms which don't support <CODE>ifdef</CODE> etc. in their make
|
|---|
| 56 | programs (like GNU make does), you can use my Make Pre-Processor script,
|
|---|
| 57 | called <CODE>mpp</CODE>, to produce a suitable <CODE>makefile</CODE>.
|
|---|
| 58 | <CODE>mpp</CODE> is just a little <CODE>awk</CODE> script which evaluates
|
|---|
| 59 | <CODE>ifdef</CODE>s.
|
|---|
| 60 | It is available from my home page.
|
|---|
| 61 | eg:
|
|---|
| 62 |
|
|---|
| 63 | <P>
|
|---|
| 64 | <PRE>
|
|---|
| 65 | mpp makefile HP > makefile.HP
|
|---|
| 66 | make -f makefile.HP
|
|---|
| 67 | </PRE>
|
|---|
| 68 | <!--...e-->
|
|---|
| 69 | <!--...sJPEG support:0:-->
|
|---|
| 70 | <H2>JPEG support</H2>
|
|---|
| 71 |
|
|---|
| 72 | <P>To build with JPEG support, you need the Independant JPEG Groups library
|
|---|
| 73 | version 6a installed in a directory somewhere.
|
|---|
| 74 |
|
|---|
| 75 | <P>You then edit/check that the makefile you are using references this
|
|---|
| 76 | directory correctly.
|
|---|
| 77 | There is a make variable called <CODE>IJG</CODE> which must point to the
|
|---|
| 78 | correct directory.
|
|---|
| 79 | On UNIX, use of this directory is indicated by passing JPEG=1 to make.
|
|---|
| 80 | On PCs, you uncomment the <CODE>IJG</CODE> definition to make it active.
|
|---|
| 81 |
|
|---|
| 82 | <P>When building with JPEG support, the build process works by copying
|
|---|
| 83 | a shrunk down <CODE>makefile</CODE> called <CODE>makeijgo</CODE> to
|
|---|
| 84 | wherever the IJG 6a is installed, and also a configuration file.
|
|---|
| 85 | It then builds the library using compiler switches suitable for
|
|---|
| 86 | building objects which are to be a part of the main GBM library.
|
|---|
| 87 |
|
|---|
| 88 | <P>So, to build GBM for AIX, with JPEG support, assuming that IJG points
|
|---|
| 89 | to a suitable directory, remembering that vanilla <CODE>make</CODE> on AIX
|
|---|
| 90 | doesn't support <CODE>ifdef</CODE> :-
|
|---|
| 91 |
|
|---|
| 92 | <P>
|
|---|
| 93 | <PRE>
|
|---|
| 94 | mpp makefile AIX JPEG > makefile.AIX
|
|---|
| 95 | make -f makefile.AIX
|
|---|
| 96 | </PRE>
|
|---|
| 97 | <!--...e-->
|
|---|
| 98 | <!--...sAuthor:0:-->
|
|---|
| 99 | <HR>
|
|---|
| 100 | This documentation is written and maintained by the GBM author, Andy Key
|
|---|
| 101 | <ADDRESS>nyangau@interalpha.co.uk</ADDRESS>
|
|---|
| 102 | <!--...e-->
|
|---|
| 103 |
|
|---|
| 104 | </BODY>
|
|---|
| 105 | </HTML>
|
|---|