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