home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
lclint.zip
/
lclint-2_3h-os2-bin.zip
/
BUILD.OS2
next >
Wrap
Text File
|
1997-09-03
|
4KB
|
81 lines
Building lclint:
----------------
This file is originally part of the binary distribution of lclint for OS/2.
For building lclint for OS/2 you need the complete "original" source
package (available e.g. via Dave Evans' lclint homepage) and the replacement
source files for OS/2.
Basic patches for making lclint compile under OS/2 have already been
applied by Dave, if the version is greater than 2.3a. However, there might
still follow OS/2 specific changes that I will distribute separately or
with the latest binary releases.
Before building lclint for OS/2 you must put the files in the os2/
subdirectory into the regular directory tree if they're not already there,
at least the top level and sub makefiles (Makefile.os2) should reside
in lclint-2.3?/ and lclint-2.3?/src/ respectively.
Edit the makefile "makefile.os2" in the "lclint-2.?" directory. During
make execution all important settings will be written to a config file
read by any sub makefile. So it may be a good idea to edit the makefile
before starting, e.g. to enter the current build date or the compiler
you attempt to use (currently only emx/gcc and CSet 2.1 are supported).
However it may work anyway to just enter "make -f makefile.os2" to build
lclint for OS/2 producing a binary similar to that shipping with the
lclint for OS/2 binary package.
Please, be aware that you need the flex library in order to build lclint.
As far as I remember the OS/2 version of flex comes with this library for
the emx/gcc compiler. If not, you will easily be able to compile it
following the instructions from flex'es README.OS2 file.
If you want to use IBM's compiler, you will probably not find the lib
as easily as the whole flex package has so far only been ported for
emx/gcc. However you can compile the lib with IBM's compiler, too. To
do this, you will have to get the flex sources from one of the usual
ftp sites and compile at least the library.
I have included a simple makefile "flexlib-icc.mak" to generate the flex
library using the CSet compiler (should also work with VisualAge C++, use
a different lib tool) and the original flex sources for version 2.5.4,
they need not be patched for OS/2 if only the lib is built. For the use
with IBM's compilers I assume the lib to be in a subdirectory:
lclint-2.3?/libfl/
If you choose a different location you may have to edit the makefile.
When using emx/gcc you can either produce code using the OMF object format
(which is default for lclint) or use a.out. The latter has the consequence
of needing emx.dll to run the binary and under certain circumstances being
able to run it under DOS using emx.exe or rsx.exe as DOS extender.
To create such a binary override the default settings in the makefile by
invoking the following little batch (the default settings for using the
a.out format defined in Makefile.os2 do *not* produce an executable that
runs under DOS):
@echo off
if exist bin\lclint del bin\lclint
make -f makefile.os2 "COMPILER=gcc-emx" "E="
if errorlevel 1 goto end
cd bin
echo on
emxbind lclint -p
@echo off
cd ..
:end
Please be aware that for debugging purposes the a.out format is the best
choice. I did not succeed in debugging any single step of lclint using
ipmd as it crashed each time I tried to load the lclint executable.
The Makefile.os2 is currently configured to use flex and bison to generate
some source files. If you do not have these tools on your system you should
change the corresponding section to use the .der files shipping with the
lclint sources.
Herbert in August 1997