]> andersk Git - splint.git/blame - os2/BUILD.OS2
Made some additional changes to the makefile. Now it builds correctly.
[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
3934e170 17You may want to set the correct date and version to be written into the \r
18lclint.exe binary in the Makefile.os2 file, although it is not strictly \r
19necessary. This should be enough to build the program. During make \r
20execution then some information will be written to a config file read \r
21by the sub makefile in the src/ directory.\r
e5a87a6c 22\r
3934e170 23Use the batch file makeos2.cmd from inside the os2/ directory to build \r
24lclint. The options to that batch file are:\r
e5a87a6c 25\r
26 makeos2 [--emx|-e|--gcc|-g|--icc|-i|--oldconf|-o|--test|-t|--package|-p]\r
27\r
3934e170 28This batch should be called from inside the os2 directory. The options \r
29starting with "e" build LCLint using emx/gcc with debug code. The letter \r
30"g" stands for gcc using the OMF object format and optimization rather \r
31than debug code. For IBMs icc compiler use "i". Each of the above \r
32options will create a new configuration. To continue a build with an \r
33existing configuration use "o". Finally "t" runs the "quicktest" part \r
34of the test suite (other tests are not yet supported).\r
e5a87a6c 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
3934e170 43After building the program you may want to testrun it, using the batch\r
44file `run_lclint.cmd' or go through the test suite using `makeos2 -t'. \r
45Before that you will need to set the environment variables in the \r
46`setenv.cmd' file that is called from the other two batches.\r
47\r
e5a87a6c 48Please, be aware that you need the flex library in order to build lclint.\r
49As far as I remember the OS/2 version of flex comes with this library for\r
50the emx/gcc compiler. If not, you will easily be able to compile it \r
51following the instructions from flex'es README.OS2 file.\r
52\r
53If you want to use IBM's compiler, you will probably not find the lib\r
54as easily as the whole flex package has so far only been ported for \r
55emx/gcc. However you can compile the lib with IBM's compiler, too. To\r
56do this, you will have to get the flex sources from one of the usual \r
57ftp sites and compile at least the library. \r
58\r
3934e170 59To compile the flex library using IBM's VisualAge C++ compiler, you \r
60only need to perform the following steps:\r
e5a87a6c 61\r
62- enter the flex source directory.\r
63- enter "icc -c -Q -O libmain.c" and "icc -c -Q -O libyywrap.c"\r
3934e170 64- enter "ilib fl.lib" from the command line (the library must not \r
65 exist) and "y", "+libmain.obj+libyywrap.obj" and "<enter>" from the \r
66 ilib prompt.\r
e5a87a6c 67- copy fl.lib somewhere where it gets found, I suggest "ibmcpp\lib".\r
68\r
69When using emx/gcc you can either produce code using the OMF object format\r
70or use a.out. The latter has the consequence of needing emx.dll to run the \r
71binary and under certain circumstances being able to run it under DOS using \r
72emx.exe or rsx.exe as DOS extender (you may want to replace the "-g" switch\r
73by "-O3" in the compiler settings for optimization rather than debug code)\r
74in such a case. \r
75\r
76To create such a binary override the default settings in the makefile by \r
77invoking the following little batch (the default settings for using the \r
78a.out format defined in Makefile.os2 do *not* produce an executable that \r
79runs under DOS):\r
80\r
81 @echo off\r
82 if exist bin\lclint del bin\lclint\r
83 make all -f makefile.os2 "COMPILER=gcc-emx" "CC=gcc -O3" "E="\r
84 if errorlevel 1 goto end\r
85 cd bin\r
86 echo on\r
87 emxbind lclint -p\r
88 @echo off\r
89 cd ..\r
90 :end\r
91\r
92Please be aware that for debugging purposes the a.out format is the best \r
93choice. I did not succeed in debugging any single step of lclint using \r
94ipmd as it crashed each time I tried to load the lclint executable.\r
95\r
96The Makefile.os2 is currently configured to use flex and bison to generate \r
97some source files. If you do not have these tools on your system you should \r
98change the corresponding section to use the .der files shipping with the \r
99lclint sources.\r
100\r
101Herbert in September 2001\r
102\r
This page took 0.786769 seconds and 5 git commands to generate.