home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc190.zip / ckomak.hlp < prev    next >
Text File  |  1994-06-01  |  7KB  |  162 lines

  1. OS/2 C-Kermit 5A(190)                                                 June 1994
  2.  
  3.  
  4.           INSTRUCTIONS FOR BUILDING FROM SOURCE CODE
  5.  
  6. Last update: Wed Jun  1 18:32:05 1994
  7.  
  8. OS/2 C-Kermit can be built using Microsoft C 6.00A, IBM C Set/2, or GNU CC.
  9. One makefile supports all three: CKOKER.MAK.
  10.  
  11. Command                    Development Environment
  12.  
  13. nmake -f ckoker.mak msc    Microsoft C 6.00.  Builds a 16-bit version.
  14. nmake -f ckoker.mak mscd   Microsoft C 6.00, with debugging info included.
  15.  
  16. In the MSC link step, you might get a message about LLIBCEP.LIB not found.
  17. At the LINK prompt, simply type: LLIBCE.
  18.  
  19. nmake -f ckoker.mak ibmc   IBM C Set/2, 32-bit, static linking
  20. nmake -f ckoker.mak ibmcd  IBM C Set/2, 32-bit, static linking, debug info.
  21.  
  22. nmake -f ckoker.mak gcc    EMX 0.8e + GNU CC 2.2.2, 32-bit, dynamic linking
  23. nmake -f ckoker.mak gccd   Same, debugging info included.
  24.  
  25. For the IBM C version, you must use LINK386 2.01.012 or later.  Earlier
  26. versions have bugs that can prevent C-Kermit from working correctly, or at
  27. all.
  28.  
  29. Note the -G2 switch in the MSC CFLAGS string.  This builds the program
  30. optimized for the 80286 processor.  When building a 32-bit version with IBM C
  31. or GCC, you can change this to G3 for the 386, to G4 for the 486, and G5 for
  32. the Pentium.  Reportedly, G4 makes the program run noticably faster on the 486
  33. and above (by optimizing instruction sequences for pipelining) without
  34. seriously affecting its performance on the 386.  However, G4 makes the program
  35. about 30K bigger so we normally build the distribution version without it so
  36. it'll fit on the 720K diskette.  Since no -Gn is specified in the 32-bit
  37. makefile entries, -G3 is the default for the 32-bit versions.
  38.  
  39. For IBM C, adding -Oi<n> (where <n> is a number) will enable inlining of
  40. functions <n> bytes or smaller.  E.g. -Oi20 results in an overall increase in
  41. the .EXE size of about 5K, and (hopefully) speeds up execution.  But given all
  42. the other optimizer bugs, this is probably not a good idea at present.
  43.  
  44. For the 16-bit version, you can't change -G2 to a higher -Gn value, because
  45. MSC (6.00, at any rate) doesn't support any higher value.
  46.  
  47. GNU EMX/GCC does not come with a MAKE program, but Microsoft or IBM NMAKE
  48. can be used, or also the public-domain DMAKE (available from OS/2 archive
  49. sites like ftp-os2.nmsu.edu), or GNU make.  C-Kermit programs built with GNU
  50. CC can only be run on OS/2 systems that have the dynamic libraries from the
  51. OS/2 developers kit on disk.
  52.  
  53. As of version 5A(189), OS/2 C-Kermit supports TCP/IP connections if you have
  54. TCP/IP installed on your OS/2 system.  Linking is still static except for the
  55. TCP/IP library, which is linked dynamically to (a) keep the size of the
  56. program down, and (b) to allow the program to take advantage of updated
  57. versions of TCP/IP without needing to be rebuilt (IBM issues CSD's about once
  58. a month).
  59.  
  60. To build C-Kermit with TCP/IP support (for which you need the IBM TCP/IP
  61. libraries and header files, and probably also IBM C Set/2), edit CKOKER.MAK to
  62. include -DTCPSOCKET and -DTCPIBM in the "DEFINES =" section, and just below
  63. it, "TCPLIBS =" should indicate TCPIPDLL.LIB -- NOTE THE COMMENTS in this
  64. section of the makefile -- different developers have different setups, and so
  65. this section has to be edited by each developer.
  66.  
  67. With DEFINES and TCPLIBS set up for a TCP/IP build, an additional file is
  68. produced, called CKOTCP16.DLL or CKOTCP32.DLL, depending on whether it is
  69. 16-bit or 32-bit build.
  70.  
  71. A 16-bit version can be produced using the MSC entry with the DEFINES and LIBS
  72. set up for TCP/IP as just described, if you have Microsoft C 6.00 *and* the
  73. IBM TCP/IP libraries and include files on your disk.
  74.  
  75.   NOTE: If the IBM-supplied TCPIP\INCLUDE\NETLIB.H file contains the
  76.   following line:
  77.  
  78.   #define SIGALRM 0
  79.  
  80.   You must remove it.
  81.  
  82. The optional SYSLEVEL.CKO files, CKOSYSL.CK1 (16-bit) and CKOSYSL.CK2 (32-bit),
  83. must be created by hand using the OS/2 EDTSYSLV.EXE program.
  84.  
  85. See the comments in the CKOKER.MAK and CKOKER.BWR files for further detail.
  86.  
  87. TCP/IP VERSIONS
  88.  
  89. NOTE: OS/2 C-Kermit cannot be built without network support at the present
  90. time.  Various #ifdef's in the source code need adjustment.
  91.  
  92. C-Kermit (at least in its edit 189-190 form) should be built on a TCP/IP 1.2.1
  93. system, *not* a TCP/IP 2.0 system (but keep reading).  This will produce a
  94. version of C-Kermit that will work with both TCP/IP versions.  However, a
  95. version of C-Kermit produced on a TCP/IP 2.0 will not be backwards compatible
  96. to a TCP/IP 1.2.1 system.
  97.  
  98. See additional comments at the top of CKONET.H.
  99.  
  100. If you decide to build C-Kermit for OS/2 with IBM TCP/IP 2.0 SDK then you must
  101. link to the following libraries: SO32DLL.LIB, TCP32DLL.LIB, DPI32DLL.LIB.  The
  102. 2.0 SDK has been shipped to all members of OS/2 DAP as part of the Developer
  103. Connection CD Subscription Service.
  104.  
  105. DEBUGGING
  106.  
  107.  . For the 32-bit IBM C version, "nmake -f ckoker.mak ibmcd",
  108.    then use IPMD CKOKER.EXE.
  109.  
  110.  . For the 16-bit MSC version, "nmake -f ckoker.mak mscd",
  111.    then use CVP CKOKER.EXE.
  112.  
  113. HOW TO DEAL WITH MICROSOFT C AND IBM C SET/2 ON THE SAME SYSTEM
  114.  
  115. Assuming you have your directories set up the same way I do, you can switch
  116. between MSC and IBMC compiling with the following two command files.  For
  117. best results, execute these files in a fresh command session.
  118.  
  119. But first, (a) remember to fix NETLIB.H as noted above, and (b) you might
  120. have to edit CONFIG.SYS to change INCLUDE= definition:
  121.  
  122.   disk:\TOOLKT21\CPLUS\OS2H should come before disk:\TOOLKT21\C\OS2H,
  123.   if you are using IBM CSet++, and vice-versa if you are using older
  124.   compilers like CSet/2.  This explains why there are two different
  125.   REXXSAA.H files.  In any case, you are likely to get compile-time
  126.   warnings (evidently harmless) about the RexxRegisterFunctionExe()
  127.   function.
  128.  
  129. IBM C:
  130.  
  131. SET PATH=C:\IBMCPP\BIN;C:\TOOLKT21\OS2BIN;C:\C600\BINP;%PATH%;
  132. SET DPATH=C:\IBMCPP\LOCALE;C:\IBMCPP\HELP;C:\IBMCPP\SYS;%DPATH%;
  133. SET LIB=C:\IBMCPP\LIB;C:\TOOLKT21\OS2LIB;C:\TCPIP\LIB;%LIB%;
  134. SET INCLUDE=C:\IBMCPP\INCLUDE;C:\IBMCPP\IBMCLASS;C:\TCPIP\INCLUDE;%INCLUDE%;
  135. SET HELP=C:\IBMCPP\HELP;%HELP%;
  136. SET BOOKSHELF=C:\IBMCPP\HELP;%BOOKSHELF%;
  137. SET HELPNDX=DDE4.NDX+%HELPNDX%;
  138. SET TMP=C:\IBMCPP\TMP
  139. SET TZ=EST5EDT,0,0,0,0,0,0,0,0,0
  140.  
  141. IBM C generates all kinds of bad code, particularly during the optimization
  142. phase.  Optimization can be turned off on a per-source-file basis.  See
  143. CKOKER.MAK for how to do this (as of June 1994, most of these problems seem
  144. to be fixed, and so now optimization is back on).
  145.  
  146. Meanwhile, IBM issues CSDs for C-Set/2 frequently.  These can be picked up
  147. from the IBM BBS at +1 800 874-2881.
  148.  
  149. To apply patches, make a CSD directory on the PC (the name of this directory
  150. doesn't matter), put the CT?.ZIP file into it, unzip it, then just type
  151. "service".
  152.  
  153. Microsoft C:
  154.  
  155. SET PATH=C:\C600\BINB;C:\C600\BINP;%PATH%;
  156. SET LIB=C:\C600\LIB;C:\TCPIP\LIB;C:\TOOLKT21\OS2LIB;%LIB%;
  157. SET INCLUDE=C:\C600\INCLUDE;C:\TCPIP\INCLUDE;%INCLUDE%;
  158. SET HELPFILES=C:\C600\HELP\*.HLP
  159. SET INIT=C:\C600\INIT
  160.  
  161. (End of CKOMAK.HLP)
  162.