home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
splint3s.zip
/
splint-3.0.1.6
/
os2
/
BUILD.OS2
next >
Wrap
Text File
|
2002-02-16
|
5KB
|
106 lines
Building splint:
----------------
This file is originally part of the binary distribution of splint
for OS/2.
For building splint for OS/2 you need the complete "original" source
package (available e.g. via Dave Evans' splint homepage) and maybe
some more recent patches for the OS/2 version. The splint home page
is at:
http://www.splint.org
My fixes can be found at:
http://www.fh-wedel.de/pub/fh-wedel/staff/di/lclint/index.html
You also need a couple of Unix tools. These are available as free
software (GNU tools) or freeware (IBM aixlike tools). In particular
the tools needed are:
- A Unix shell. I use ksh, but others may do as well
- The Unix `date', `cp', `mv', `rm' and `echo' commands
- The `sed' and `tr' filters
- GNU make (IBM/M$'s `nmake' does *not* work here)
- Optionally, `flex' and `bison' (if not available, comment out
the corresponding entries from the Makefile.os2 file)
Use the batch file makeos2.cmd from inside the os2/ directory to build
splint. The options to that batch file are:
makeos2 [--emx|-e|--gcc|-g|--icc|-i|--oldconf|-o|--test|-t|--package|-p]
This batch should be called from inside the os2 directory. The options
starting with "e" build splint using emx/gcc with debug code. The letter
"g" stands for gcc using the OMF object format and optimization rather
than debug code. For IBMs icc compiler use "i". Each of the above
options will create a new configuration. To continue a build with an
existing configuration use "o". Finally "t" runs the "quicktest" part
of the test suite (other tests are not yet supported).
If you experience problems with the automatic configuration file creation
from within Makefile.os2 you may alternatively call makeos2.cmd with the
`-o' option and use the existing config.inc file (assuming that you use
IBMC, else edit it by hand). The files to check are `setenv.cmd',
`make.vars' and `..\config.h'.
After building the program you may want to testrun it, using the batch
file `run_splint.cmd' or go through the test suite using `makeos2 -t'.
Please, be aware that you need the flex library in order to build splint.
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.
To compile the flex library using IBM's VisualAge C++ compiler, you
only need to perform the following steps:
- enter the flex source directory.
- enter "icc -c -Q -O libmain.c" and "icc -c -Q -O libyywrap.c"
- enter "ilib fl.lib" from the command line (the library must not
exist) and "y", "+libmain.obj+libyywrap.obj" and "<enter>" from the
ilib prompt.
- copy fl.lib somewhere where it gets found, I suggest "ibmcpp\lib".
When using emx/gcc you can either produce code using the OMF object format
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 (you may want to replace the "-g" switch
by "-O3" in the compiler settings for optimization rather than debug code)
in such a case.
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\splint del bin\splint
make all -f makefile.os2 "COMPILER=gcc-emx" "CC=gcc -O3" "E="
if errorlevel 1 goto end
cd bin
echo on
emxbind splint -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 splint using
ipmd as it crashed each time I tried to load the splint 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
splint sources.
Herbert in September 2001