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