home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lclint.zip / lclint-2_3h-os2-bin.zip / BUILD.OS2 next >
Text File  |  1997-09-03  |  4KB  |  81 lines

  1. Building lclint:
  2. ----------------
  3.  
  4. This file is originally part of the binary distribution of lclint for OS/2.
  5.  
  6. For building lclint for OS/2 you need the complete "original" source
  7. package (available e.g. via Dave Evans' lclint homepage) and the replacement
  8. source files for OS/2. 
  9.  
  10. Basic patches for making lclint compile under OS/2 have already been 
  11. applied by Dave, if the version is greater than 2.3a. However, there might
  12. still follow OS/2 specific changes that I will distribute separately or
  13. with the latest binary releases.
  14.  
  15. Before building lclint for OS/2 you must put the files in the os2/ 
  16. subdirectory into the regular directory tree if they're not already there,
  17. at least the top level and sub makefiles (Makefile.os2) should reside
  18. in lclint-2.3?/ and lclint-2.3?/src/ respectively.
  19.  
  20. Edit the makefile "makefile.os2" in the "lclint-2.?" directory. During
  21. make execution all important settings will be written to a config file
  22. read by any sub makefile. So it may be a good idea to edit the makefile
  23. before starting, e.g. to enter the current build date or the compiler
  24. you attempt to use (currently only emx/gcc and CSet 2.1 are supported).
  25.  
  26. However it may work anyway to just enter "make -f makefile.os2" to build
  27. lclint for OS/2 producing a binary similar to that shipping with the 
  28. lclint for OS/2 binary package.
  29.  
  30. Please, be aware that you need the flex library in order to build lclint.
  31. As far as I remember the OS/2 version of flex comes with this library for
  32. the emx/gcc compiler. If not, you will easily be able to compile it 
  33. following the instructions from flex'es README.OS2 file.
  34.  
  35. If you want to use IBM's compiler, you will probably not find the lib
  36. as easily as the whole flex package has so far only been ported for 
  37. emx/gcc. However you can compile the lib with IBM's compiler, too. To
  38. do this, you will have to get the flex sources from one of the usual 
  39. ftp sites and compile at least the library. 
  40.  
  41. I have included a simple makefile "flexlib-icc.mak" to generate the flex 
  42. library using the CSet compiler (should also work with VisualAge C++, use 
  43. a different lib tool) and the original flex sources for version 2.5.4, 
  44. they need not be patched for OS/2 if only the lib is built. For the use
  45. with IBM's compilers I assume the lib to be in a subdirectory: 
  46.   lclint-2.3?/libfl/
  47. If you choose a different location you may have to edit the makefile.
  48.  
  49. When using emx/gcc you can either produce code using the OMF object format
  50. (which is default for lclint) or use a.out. The latter has the consequence 
  51. of needing emx.dll to run the binary and under certain circumstances being 
  52. able to run it under DOS using emx.exe or rsx.exe as DOS extender. 
  53.  
  54. To create such a binary override the default settings in the makefile by 
  55. invoking the following little batch (the default settings for using the 
  56. a.out format defined in Makefile.os2 do *not* produce an executable that 
  57. runs under DOS):
  58.  
  59.     @echo off
  60.     if exist bin\lclint del bin\lclint
  61.     make -f makefile.os2 "COMPILER=gcc-emx" "E="
  62.     if errorlevel 1 goto end
  63.     cd bin
  64.     echo on
  65.     emxbind lclint -p
  66.     @echo off
  67.     cd ..
  68.     :end
  69.  
  70. Please be aware that for debugging purposes the a.out format is the best 
  71. choice. I did not succeed in debugging any single step of lclint using 
  72. ipmd as it crashed each time I tried to load the lclint executable.
  73.  
  74. The Makefile.os2 is currently configured to use flex and bison to generate 
  75. some source files. If you do not have these tools on your system you should 
  76. change the corresponding section to use the .der files shipping with the 
  77. lclint sources.
  78.  
  79. Herbert in August 1997
  80.  
  81.