]> andersk Git - splint.git/blame - os2/BUILD.OS2
Fixed syntax error in file.
[splint.git] / os2 / BUILD.OS2
CommitLineData
87fa79e5 1Building splint:\r
e5a87a6c 2----------------\r
3\r
87fa79e5 4This file is originally part of the binary distribution of splint \r
5for OS/2.\r
e5a87a6c 6\r
87fa79e5 7For building splint for OS/2 you need the complete "original" source\r
8package (available e.g. via Dave Evans' splint homepage) and maybe \r
9some more recent patches for the OS/2 version. The splint home page\r
e5a87a6c 10is at:\r
11\r
87fa79e5 12 http://www.splint.org\r
e5a87a6c 13\r
14My fixes can be found at:\r
15\r
16 http://www.fh-wedel.de/pub/fh-wedel/staff/di/lclint/index.html\r
17\r
87fa79e5 18You also need a couple of Unix tools. These are available as free \r
19software (GNU tools) or freeware (IBM aixlike tools). In particular\r
20the tools needed are:\r
21\r
22 - A Unix shell. I use ksh, but others may do as well\r
23 - The Unix `date', `cp', `mv', `rm' and `echo' commands\r
24 - The `sed' and `tr' filters\r
25 - GNU make (IBM/M$'s `nmake' does *not* work here)\r
26 - Optionally, `flex' and `bison' (if not available, comment out\r
27 the corresponding entries from the Makefile.os2 file)\r
e5a87a6c 28\r
3934e170 29Use the batch file makeos2.cmd from inside the os2/ directory to build \r
87fa79e5 30splint. The options to that batch file are:\r
e5a87a6c 31\r
32 makeos2 [--emx|-e|--gcc|-g|--icc|-i|--oldconf|-o|--test|-t|--package|-p]\r
33\r
3934e170 34This batch should be called from inside the os2 directory. The options \r
87fa79e5 35starting with "e" build splint using emx/gcc with debug code. The letter \r
3934e170 36"g" stands for gcc using the OMF object format and optimization rather \r
37than debug code. For IBMs icc compiler use "i". Each of the above \r
38options will create a new configuration. To continue a build with an \r
39existing configuration use "o". Finally "t" runs the "quicktest" part \r
40of the test suite (other tests are not yet supported).\r
e5a87a6c 41\r
e5d2a658 42If you experience problems with the automatic configuration file creation\r
43from within Makefile.os2 you may alternatively call makeos2.cmd with the\r
44`-o' option and use the existing config.inc file (assuming that you use\r
87fa79e5 45IBMC, else edit it by hand). The files to check are `setenv.cmd', \r
46`make.vars' and `..\config.h'. \r
e5d2a658 47\r
3934e170 48After building the program you may want to testrun it, using the batch\r
87fa79e5 49file `run_splint.cmd' or go through the test suite using `makeos2 -t'. \r
3934e170 50\r
87fa79e5 51Please, be aware that you need the flex library in order to build splint.\r
e5a87a6c 52As far as I remember the OS/2 version of flex comes with this library for\r
53the emx/gcc compiler. If not, you will easily be able to compile it \r
54following the instructions from flex'es README.OS2 file.\r
55\r
56If you want to use IBM's compiler, you will probably not find the lib\r
57as easily as the whole flex package has so far only been ported for \r
58emx/gcc. However you can compile the lib with IBM's compiler, too. To\r
59do this, you will have to get the flex sources from one of the usual \r
60ftp sites and compile at least the library. \r
61\r
3934e170 62To compile the flex library using IBM's VisualAge C++ compiler, you \r
63only need to perform the following steps:\r
e5a87a6c 64\r
65- enter the flex source directory.\r
66- enter "icc -c -Q -O libmain.c" and "icc -c -Q -O libyywrap.c"\r
3934e170 67- enter "ilib fl.lib" from the command line (the library must not \r
68 exist) and "y", "+libmain.obj+libyywrap.obj" and "<enter>" from the \r
69 ilib prompt.\r
e5a87a6c 70- copy fl.lib somewhere where it gets found, I suggest "ibmcpp\lib".\r
71\r
72When using emx/gcc you can either produce code using the OMF object format\r
73or use a.out. The latter has the consequence of needing emx.dll to run the \r
74binary and under certain circumstances being able to run it under DOS using \r
75emx.exe or rsx.exe as DOS extender (you may want to replace the "-g" switch\r
76by "-O3" in the compiler settings for optimization rather than debug code)\r
77in such a case. \r
78\r
79To create such a binary override the default settings in the makefile by \r
80invoking the following little batch (the default settings for using the \r
81a.out format defined in Makefile.os2 do *not* produce an executable that \r
82runs under DOS):\r
83\r
84 @echo off\r
87fa79e5 85 if exist bin\splint del bin\splint\r
e5a87a6c 86 make all -f makefile.os2 "COMPILER=gcc-emx" "CC=gcc -O3" "E="\r
87 if errorlevel 1 goto end\r
88 cd bin\r
89 echo on\r
87fa79e5 90 emxbind splint -p\r
e5a87a6c 91 @echo off\r
92 cd ..\r
93 :end\r
94\r
95Please be aware that for debugging purposes the a.out format is the best \r
87fa79e5 96choice. I did not succeed in debugging any single step of splint using \r
97ipmd as it crashed each time I tried to load the splint executable.\r
e5a87a6c 98\r
99The Makefile.os2 is currently configured to use flex and bison to generate \r
100some source files. If you do not have these tools on your system you should \r
101change the corresponding section to use the .der files shipping with the \r
87fa79e5 102splint sources.\r
e5a87a6c 103\r
104Herbert in September 2001\r
105\r
This page took 0.070061 seconds and 5 git commands to generate.