home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / c-kermit / ck9xcc.mak < prev    next >
Makefile  |  2020-01-01  |  8KB  |  231 lines

  1. # This is a special makefile for cross-building OS-9/68000 C-Kermit 7.0
  2. # on Solaris 7.0 with xcc (Ultra C Version 2.0).  
  3. # ck9ren.c is omitted from this build because rename() is in the library. 
  4. #
  5. # This makefile assumes that the environment variables CDEF and CLIB are
  6. # pointing to the DEFS and LIB directories in an MWOS tree structure for
  7. # your site.(See Ultra C Documentation for this).
  8. #
  9. # Edit the PROGRAM macro to the name you want kermit to have. Note that this
  10. # will be the module name, even if you subsequently rename the file.
  11. #
  12. PROGRAM = kermit
  13. #
  14. #   For network support, enable the following lines:
  15. #
  16. NET_CFLAGS = -dTCPSOCKET
  17. NET_LFLAGS = -l=netdb.l -l=socklib.l
  18. #
  19. #   minimum size:
  20. #
  21. #CPPFLAGS = -dVOID=void -dSIG_V -dDYNAMIC -dZFCDAT -dNOHELP -dNOSCRIPT \
  22. # -dNOSPL -dNOCSETS -dNOMSEND -dNODIAL -dNOICP -dNORANDOM -dNODEBUG -dNOTLOG
  23. #
  24. # minimum size with debug:
  25. #
  26. #CPPFLAGS = -dVOID=void -dSIG_V -dDYNAMIC -dZFCDAT -dNOHELP -dNOSCRIPT \
  27. # -dNOSPL -dNOCSETS -dNOMSEND -dNODIAL -dNOICP -dNORANDOM
  28. #
  29. # maximum size:
  30. #
  31. CPPFLAGS = -dOSK -dVOID=void -dSIG_V -dDYNAMIC -dNOCSETS -dOSKXXC \
  32.     -dZFCDAT -dPARSENSE -dKANJI -dMYCURSES -dNO_DNS_SRV \
  33.     -dCK_APC -dCK_REDIR -dRENAME -dCK_TTYFD -dNOOLDMODEMS -dNORANDOM \
  34.     -dNOMKDIR -dCK_ANSILIBS
  35.  
  36. ###############################################################################
  37. #
  38. #   Target Processsor Type
  39. #
  40. #   Use the appropriate CPU macro depending on your processor.
  41. #   If you choose 68000    or 68010 here and have you may have to
  42. #   omit certain parts of Kermit to fit the data area into <64k.
  43. #   Or modify the compile options to enable a jumptable to be used.
  44. #
  45. #               Motorola 68000 Family Targets
  46. #          <name>          Target          <name>           Target
  47. #          --------------  ------          --------------   ------
  48. #          68k or 68000    68000           68332            68332
  49. #          010 or 68010    68010           68F333           68f333
  50. #          070 or 68070    68070           68334            68334
  51. #          68301           68301           68340            68340
  52. #          68302           68302           68341            68341
  53. #          68303           68303           68349            68349
  54. #          68306           68306           68360            68360
  55. #          68307           68307           020 or 68020     68020
  56. #          68322           68322           030 or 68030     68030
  57. #          68328           68328           68EC030 or EC030 68EC030
  58. #          CPU32           CPU32           040 or 68040     68040
  59. #          CPU32+          CPU32+          68EC040 or EC040 68EC040
  60. #          68330           68330           68LC040 or LC040 68LC040
  61. #          68331           68331           060 or 68060     68060
  62. #
  63. # CPU and OS can be set for an OS9000 target but this has not been tested.
  64. # Various files which have 68000 assembler code will need to be looked at.
  65. #
  66. CPU     = 68020        # 68020 should be OK for all >=68020 processors
  67. OS    = OSK
  68. CCFLAGS = -to=$(OS) -tp=$(CPU),ld
  69. LCFLAGS = -to=$(OS) -tp=$(CPU),ld
  70.  
  71. ###############################################################################
  72. #
  73. # Compile Variables:
  74. #
  75. # The -cw option gives verbose compiler warnings.
  76. #
  77. CC     = xcc
  78. CFLAGS     = -eas=. -ca $(CCFLAGS) $(CPPFLAGS) $(NET_CFLAGS) -d_OPT_PROTOS ##-cw
  79.  
  80. ###############################################################################
  81. #
  82. # Link variables:
  83. #
  84. # If you don't want to use the csl trap handler, remove the -i option
  85. # from LCFLAGS.
  86. # If you get runtime "stack overflow" errors try increasing the -olM=8K
  87. #
  88. LC     = $(CC)
  89. LFLAGS     = $(LCFLAGS) $(NET_LFLAGS) -l=sys_clib.l -l=termlib.l -olM=8k -i
  90.  
  91. ###############################################################################
  92. #
  93. # Dependencies Section:
  94. #
  95. .c.r:
  96.     $(CC) $< $(CFLAGS)
  97.  
  98. .a.r:
  99.     $(CC) $< $(CFLAGS)
  100.  
  101. RFILES = ckcmai.r ckclib.r ckucmd.r ckuusr.r ckuus2.r ckuus3.r ckuus4.r \
  102. ckuus5.r ckuus6.r ckuus7.r ckuusx.r ckuusy.r ckcpro.r ckcfns.r ckcfn2.r \
  103. ckcfn3.r ckctel.r ckuxla.r ck9con.r ck9tio.r ck9fio.r ck9asm.r \
  104. ckudia.r ckuscr.r ckusig.r ckcnet.r ckcuni.r
  105.  
  106. $(PROGRAM): $(RFILES)
  107.     $(LC) $(LFLAGS) -fd=$@ $(RFILES)
  108.  
  109. ckcmai.r: ckcmai.c ckcsym.h ckcasc.h ckcdeb.h ckcker.h ckcnet.h ckuusr.h \
  110. ckcsig.h
  111.  
  112. ckclib.r: ckclib.c ckcsym.h ckcasc.h ckcdeb.h
  113.  
  114. ck9asm.r: ck9asm.a
  115.     $(CC) $(CFLAGS) ck9asm.a
  116.  
  117. ckcpro.r: ckcpro.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h
  118.     $(CC) $(CFLAGS) ckcpro.c
  119.  
  120. # -o=0 prevents optimiser warning under xcc v2.0)
  121. ckcfns.r: ckcfns.c ckcsym.h ckcasc.h ckcdeb.h ckcker.h ckcuni.h ckcxla.h \
  122. ckuxla.h
  123.     $(CC) $(CFLAGS) ckcfns.c -o=0
  124.  
  125. ckcfn2.r: ckcfn2.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckcuni.h ckcxla.h \
  126. ckuxla.h
  127.  
  128. ckcfn3.r: ckcfn3.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckcuni.h ckcxla.h \
  129. ckuxla.h
  130.  
  131. ckuxla.r: ckuxla.c ckcsym.h ckcdeb.h ckcker.h ckucmd.h ckcuni.h ckcxla.h \
  132. ckuxla.h
  133.  
  134. ckuusr.r: ckuusr.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckuusr.h ckucmd.h \
  135. ckcuni.h ckcxla.h ckuxla.h ckcnet.h
  136.     $(CC) $(CFLAGS) ckuusr.c 
  137.  
  138. ckuus2.r: ckuus2.c ckcsym.h ckcdeb.h ckcnet.h ckcasc.h ckcker.h ckuusr.h \
  139. ckucmd.h ckcuni.h ckcxla.h ckuxla.h
  140.     $(CC) $(CFLAGS) ckuus2.c
  141.  
  142. ckuus3.r: ckuus3.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckcuni.h ckcxla.h \
  143. ckuxla.h ckcnet.h ckuusr.h ckucmd.h
  144.     $(CC) $(CFLAGS) ckuus3.c 
  145.  
  146. ckuus4.r: ckuus4.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckuusr.h ckucmd.h \
  147. ckuver.h ckcnet.h ckcuni.h ckcxla.h ckuxla.h
  148.     $(CC) $(CFLAGS) ckuus4.c
  149.  
  150. ckuus5.r: ckuus5.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckuusr.h ckucmd.h \
  151. ckcnet.h ckcuni.h ckcxla.h ckuxla.h
  152.     $(CC) $(CFLAGS) ckuus5.c
  153.  
  154. ckuus6.r: ckuus6.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckuusr.h ckucmd.h \
  155. ckcuni.h ckcxla.h ckuxla.h ckcnet.h
  156.     $(CC) $(CFLAGS) ckuus6.c
  157.  
  158. ckuus7.r: ckuus7.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckcuni.h ckcxla.h \
  159. ckuxla.h ckcnet.h ckuusr.h ckucmd.h
  160.     $(CC) $(CFLAGS) ckuus7.c -o=0
  161.  
  162. ckuusx.r: ckuusx.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckuusr.h ckucmd.h \
  163. ckcuni.h ckcxla.h ckuxla.h ckcsig.h
  164.     $(CC) $(CFLAGS) ckuusx.c
  165.  
  166. ckuusy.r: ckuusy.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckucmd.h ckcnet.h
  167.  
  168. ckucmd.r: ckucmd.c ckcsym.h ckcdeb.h ckucmd.h ckcker.h ckcasc.h
  169.     $(CC) $(CFLAGS) $*.c 
  170.  
  171. ck9fio.r: ck9fio.c ckcsym.h ckcdeb.h ckcker.h ckcasc.h
  172.  
  173. # Needed only for OS-9 versions that don't have rename() function.
  174. # ck9ren.r: ck9ren.c ckcsym.h ckcdeb.h
  175.  
  176. ck9tio.r: ck9tio.c ckcsym.h ckcdeb.h ckcnet.h
  177.     $(CC) $(CFLAGS) -dO_GOODDRIVER $*.c 
  178.  
  179. ck9con.r: ck9con.c ckcsym.h ckcdeb.h ckucmd.h ckcker.h ckcasc.h ckcuni.h \
  180. ckcxla.h ckuxla.h ckcnet.h
  181.  
  182. ckudia.r: ckudia.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckucmd.h ckcnet.h \
  183. ckuusr.h ckcsig.h
  184.     $(CC) $(CFLAGS) $*.c 
  185.  
  186. ckuscr.r: ckuscr.c ckcsym.h ckcdeb.h ckcasc.h ckcker.h ckuusr.h ckucmd.h \
  187. ckcnet.h ckcsig.h
  188.  
  189. ckcnet.r: ckcnet.c ckcsym.h ckcdeb.h ckcker.h ckcnet.h ckcsig.h
  190.  
  191. ckctel.r: ckctel.c ckcsym.h ckcdeb.h ckcker.h ckcnet.h ckctel.h ckclib.h
  192.  
  193. ckusig.r: ckusig.c ckcasc.h ckcdeb.h ckcker.h ckcnet.h ckuusr.h ckcsig.h
  194.  
  195. ckcuni.r: ckcuni.c ckcsym.h ckcdeb.h ckucmd.h ckcker.h ckcuni.h ckcxla.h \
  196. ckuxla.h
  197.  
  198. ###############################################################################
  199. #
  200. # Section to make "wart" under Cross Development system
  201. # and then build ckcpro.c from the source file ckcpro.w.
  202. # If you are compiling on a target system, then change the
  203. # gcc line below to your requirements.
  204. #
  205. WART    = ./wart
  206.  
  207. ckcpro.c: $(WART) ckcpro.w 
  208.     @echo Buidling $@
  209.     $(WART) ckcpro.w ckcpro.c
  210.  
  211. $(WART): ckwart.c ckcsym.h ckcdeb.h 
  212.     @echo Building Native Version of wart        
  213.     gcc ckwart.c -O2 -o $(WART)
  214.        
  215. ###############################################################################
  216. #
  217. # Clean Build
  218. #
  219. clean:    
  220.     -rm $(RFILES) $(WART) ckcpro.c $(PROGRAM)
  221.  
  222.  
  223. ###############################################################################
  224. #
  225. # Upload OS9 executable to the target system.
  226. # This will have to be modified for your environment.
  227. #
  228. up:    $(PROGRAM)
  229.     mfxup -hx $(PROGRAM) USR/STEVE/CMDS/kermit
  230.     
  231.