source: trunk/JPGPROC/source/gbmsrc/gbmsrc.htm@ 41

Last change on this file since 41 was 2, checked in by stevenhl, 8 years ago

Import sources from cwmm-full.zip dated 2005-03-21

File size: 3.1 KB
Line 
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
10main <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
18OS/2 using VisualAge C++ 3.0 (with CTC306, CTD302 and CTU304),
19Win32 using Visual C++ (version 4.0, 4.2, 5.0 and 6.0),
2032 bit DOS using Watcom C/C++ version (10.6 and 11.0b) + CauseWay 1.3,
21AIX using xlc,
22and 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
30platform independant source files, and a few subdirectories containing
31platform dependant files.
32So your first step before building should be to copy the appropriate
33subdirectory into the main directory.
34eg: 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,
43and the configuration file for the JPEG source.
44
45<P>The UNIX <CODE>makefile</CODE> supports a variety of different UNIXes.
46By default it supports Linux, but can be made to work on other UNIXes
47such as AIX, HP-UX and SunOS by invoking GNU make with a macro defined.
48eg: 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
56programs (like GNU make does), you can use my Make Pre-Processor script,
57called <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.
60It is available from my home page.
61eg:
62
63<P>
64<PRE>
65 mpp makefile HP &gt; 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
73version 6a installed in a directory somewhere.
74
75<P>You then edit/check that the makefile you are using references this
76directory correctly.
77There is a make variable called <CODE>IJG</CODE> which must point to the
78correct directory.
79On UNIX, use of this directory is indicated by passing JPEG=1 to make.
80On 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
83a shrunk down <CODE>makefile</CODE> called <CODE>makeijgo</CODE> to
84wherever the IJG 6a is installed, and also a configuration file.
85It then builds the library using compiler switches suitable for
86building 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
89to a suitable directory, remembering that vanilla <CODE>make</CODE> on AIX
90doesn't support <CODE>ifdef</CODE> :-
91
92<P>
93<PRE>
94 mpp makefile AIX JPEG &gt; makefile.AIX
95 make -f makefile.AIX
96</PRE>
97<!--...e-->
98<!--...sAuthor:0:-->
99<HR>
100This 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>
Note: See TracBrowser for help on using the repository browser.