]> andersk Git - splint.git/blob - os2/BUILD.OS2
ab9ff4aa69bc48b96d894bd16541e0b4d2790098
[splint.git] / os2 / BUILD.OS2
1 Building splint:\r
2 ----------------\r
3 \r
4 This file is originally part of the binary distribution of splint \r
5 for OS/2.\r
6 \r
7 For building splint for OS/2 you need the complete "original" source\r
8 package (available e.g. via Dave Evans' splint homepage) and maybe \r
9 some more recent patches for the OS/2 version. The splint home page\r
10 is at:\r
11 \r
12   http://www.splint.org\r
13 \r
14 My 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
18 You also need a couple of Unix tools. These are available as free \r
19 software (GNU tools) or freeware (IBM aixlike tools). In particular\r
20 the 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
28 \r
29 Use the batch file makeos2.cmd from inside the os2/ directory to build \r
30 splint. The options to that batch file are:\r
31 \r
32   makeos2 [--emx|-e|--gcc|-g|--icc|-i|--oldconf|-o|--test|-t|--package|-p]\r
33 \r
34 This batch should be called from inside the os2 directory. The options \r
35 starting with "e" build splint using emx/gcc with debug code. The letter \r
36 "g" stands for gcc using the OMF object format and optimization rather \r
37 than debug code. For IBMs icc compiler use "i".  Each of the above \r
38 options will create a new configuration. To continue a build with an \r
39 existing configuration use "o". Finally "t" runs the "quicktest" part \r
40 of the test suite (other tests are not yet supported).\r
41 \r
42 If you experience problems with the automatic configuration file creation\r
43 from 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
45 IBMC, else edit it by hand). The files to check are `setenv.cmd', \r
46 `make.vars' and `..\config.h'. \r
47 \r
48 After building the program you may want to testrun it, using the batch\r
49 file `run_splint.cmd' or go through the test suite using `makeos2 -t'. \r
50 \r
51 Please, be aware that you need the flex library in order to build splint.\r
52 As far as I remember the OS/2 version of flex comes with this library for\r
53 the emx/gcc compiler. If not, you will easily be able to compile it \r
54 following the instructions from flex'es README.OS2 file.\r
55 \r
56 If you want to use IBM's compiler, you will probably not find the lib\r
57 as easily as the whole flex package has so far only been ported for \r
58 emx/gcc. However you can compile the lib with IBM's compiler, too. To\r
59 do this, you will have to get the flex sources from one of the usual \r
60 ftp sites and compile at least the library. \r
61 \r
62 To compile the flex library using IBM's VisualAge C++ compiler, you \r
63 only need to perform the following steps:\r
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
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
70 - copy fl.lib somewhere where it gets found, I suggest "ibmcpp\lib".\r
71 \r
72 When using emx/gcc you can either produce code using the OMF object format\r
73 or use a.out. The latter has the consequence of needing emx.dll to run the \r
74 binary and under certain circumstances being able to run it under DOS using \r
75 emx.exe or rsx.exe as DOS extender (you may want to replace the "-g" switch\r
76 by "-O3" in the compiler settings for optimization rather than debug code)\r
77 in such a case. \r
78 \r
79 To create such a binary override the default settings in the makefile by \r
80 invoking the following little batch (the default settings for using the \r
81 a.out format defined in Makefile.os2 do *not* produce an executable that \r
82 runs under DOS):\r
83 \r
84     @echo off\r
85     if exist bin\splint del bin\splint\r
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
90     emxbind splint -p\r
91     @echo off\r
92     cd ..\r
93     :end\r
94 \r
95 Please be aware that for debugging purposes the a.out format is the best \r
96 choice. I did not succeed in debugging any single step of splint using \r
97 ipmd as it crashed each time I tried to load the splint executable.\r
98 \r
99 The Makefile.os2 is currently configured to use flex and bison to generate \r
100 some source files. If you do not have these tools on your system you should \r
101 change the corresponding section to use the .der files shipping with the \r
102 splint sources.\r
103 \r
104 Herbert in September 2001\r
105 \r
This page took 0.039768 seconds and 3 git commands to generate.