home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc072.zip / makefile < prev   
Makefile  |  1989-08-14  |  15KB  |  386 lines

  1. # CKUKER.MAK, Version 2.13, 24 January 1989
  2. #
  3. # -- Makefile to build C-Kermit for Unix and Unix-like systems --
  4. #
  5. # Before proceeding, read the instructions below, and also read the file
  6. # ckuker.bwr (the "beware file"), and then rename this file to "makefile"
  7. # or "Makefile" if necessary, and then:
  8. #
  9. # for Amdahl UTS 2.4 on IBM 370 series & compatible mainframes, "make uts24"
  10. # for Amdahl UTSV IBM 370 series & compatible mainframes, "make sys3"
  11. # for Apollo DOMAIN/IX, "make bsd" or "make sys3", for desired environment
  12. # for AT&T 3B1, 6300 machines, "make sys3"
  13. # for AT&T 3B2, 3B20 systems, "make att3bx"
  14. # for AT&T 7300 Unix PC machine, "make sys3upc"
  15. # for AT&T generic System III/System V, "make sys3" or "make sys3nid"
  16. # for ATT System V R3, use "make sys5r3".  This is different from the above.
  17. # for BBN C/70 with IOS 2.0, "make c70"
  18. # for Bell Unix Version 7 (aka 7th Edition), "make v7" (but see below)
  19. # for Berkeley Unix 4.x, "make bsd" (tested with 4.1, 4.2, and 4.3)
  20. # for Berkeley Unix 2.9 (DEC PDP-11 or Pro-3xx), "make bsd29"
  21. # for Berkeley Unix 2.10, "make bsd210"
  22. # for CDC VX/VE 5.2.1 Sys V emulation, "make vxve"
  23. # for CIE Systems 680/20 with Regulus, "make cie"
  24. # for DEC Ultrix, "make bsd"
  25. # for DEC Pro-350 with Pro/Venix V1.x, "make provx1"
  26. # for DEC Pro-350 with Pro/Venix V2.0 (Sys V), "make sys3nid" 
  27. # for DEC Pro-380 with Pro/Venix V2.0 (Sys V), "make sys3" or "make sys3nid"
  28. # for Fortune 32:16, For:Pro 1.8, "make ft18"
  29. # for HP-9000 Series with HP-UX, "make hpux"
  30. # for IBM 370 Series with IX/370, "make ix370"
  31. # for Intel Xenix, "make sco286"
  32. # for Interactive System III (PC/IX) on PC/XT, "make pcix"
  33. # for Interactive Sys III on other systems, "make is3"
  34. # for Masscomp variation on Sys III, "make rtu"
  35. # for Microport Sys V, "make mpsysv"
  36. # for Microsoft,IBM Xenix (/286, PC/AT, etc), "make xenix" or "make sco286"
  37. # for NCR Tower 1632, OS 1.02, "make tower1"
  38. # for NCR Tower 1632 with System V, "make sys3"
  39. # for SCO Xenix 2.2.1 with development system 2.2 on 8086/8 "make sco86"
  40. # for SCO Xenix/286 2.2.1 with development system 2.2 on 80286, "make sco286"
  41. # for SCO Xenix/386 2.2.2, "make sco386"
  42. # for Sequent Balance 8000, "make bsd"
  43. # for SUN with SUNOS 4.0 or later, "make sunos4"
  44. # for Valid Scaldstar, "make valid"
  45. #
  46. # The result should be a runnable program called "wermit" in the current 
  47. # directory.  After satisfactory testing, you can rename wermit to "kermit" 
  48. # and put it where users can find it.
  49. #
  50. # To remove intermediate and object files, "make clean".
  51. # To run lint on the source files, "make lint".
  52. #
  53. ##############################################################################
  54. #
  55. # Notes:
  56. #
  57. #  In many cases, the -O (optimize) compiler switch is omitted.  Feel free
  58. #  to add it if you trust your optimizer.  The ckuus2.c module, in particular,
  59. #  tends to make optimizers blow up.
  60. #
  61. #  "make bsd" should produce a working C-Kermit for 4.1, 4.2, and 4.3bsd on
  62. #  VAX, SUN-3, SUN-4, Pyramid, and other 4.x systems, and also VAX/Ultrix.
  63. #
  64. #  Either "make sys3" or "make sys3nid" tends to produce a working version on
  65. #  any ATT System III or System V R2 or earlier system, including Motorola Four
  66. #  Phase, Callan, Unistar, Cadmus, NCR Tower, HP9836 Series 200, Plexus,
  67. #  Heurikon, etc etc (for exceptions, see below; some AT&T 3Bx systems have 
  68. #  their own entry).  As far as C-Kermit goes, there is no functional 
  69. #  difference between ATT System III and System V R2, so there is no need for 
  70. #  a separate "make sys5" entry (but there is one anyway; it merely invokes
  71. #  "make sys3"). But for ATT System V R3, use "make sys5r3".  This is 
  72. #  different from the above because of the redefinition of signal().
  73. #
  74. #  "make sys3nid" is equivalent to "make sys3" but leaves out the -i option,
  75. #  which is used indicate that separate instruction and data (text) spaces are
  76. #  to be used, as on a PDP-11.  Some systems don't support this option, others
  77. #  may require it.  If one of these options doesn't work on your System III
  78. #  or System V system, try the other.
  79. #
  80. #  For Xenix...  What's Xenix?  There are so many different products & versions
  81. #  sold under this name, the name "xenix" is almost meaningless.  IBM, SCO,
  82. #  Microsoft, etc, IBM Xenix 1.0 =(?) Microsoft Xenix 3.0 = ???  Nevertheless,
  83. #  try "make xenix" for IBM or Microsoft, or "make sco286" or "make sco86" for
  84. #  for SCO Xenix.  If these don't work, try the following modifications to
  85. #  this Makefile:
  86. #    Change "CC= cc" to "CC = cc -LARGE"
  87. #    In the "xenix:" make entry, add "-M2m -UM_I86" to the compiler switches
  88. #    (for the IBM PC family), and "-Mm -lx" to the link switches.
  89. #
  90. #  For Unix Version 7, several variables must be defined to the values
  91. #  associated with your system.  BOOTNAME=/edition7 is the kernel image on
  92. #  okstate's Perkin-Elmer 3230.  Others will probably be /unix.  PROCNAME=proc
  93. #  is the name of the structure assigned to each process on okstate's system.
  94. #  This may be "_proc" or some other variation.  See <sys/proc.h> for more info
  95. #  on your systems name conventions.  NPROCNAME=nproc is the name of a
  96. #  Kernal variable that tells how many "proc" structures there are.  Again
  97. #  this may be different on your system, but nproc will probably be somewhere.
  98. #  The variable NPTYPE is the type of the nproc variable -- int, short, etc.
  99. #  which can probably be gleaned from <sys/param.h>.
  100. #  The definition of DIRECT is a little more complicated.  If nlist() returns,
  101. #  for "proc" only, the address of the array, then you should define DIRECT
  102. #  as it is below.  If however, nlist() returns the address of a pointer to
  103. #  the array, then you should give DIRECT a null definition (DIRECT= ).  The
  104. #  extern declaration in <sys/proc.h> should clarify this for you.  If it
  105. #  is "extern struct proc *proc", then you should NOT define DIRECT.  If it
  106. #  is "extern struct proc proc[]", then you should probably define DIRECT as
  107. #  it is below.  See ckuv7.hlp for further information.
  108. #
  109. #  For 2.9bsd, the makefile may use pcc rather than cc for compiles;
  110. #  that's what the CC and CC2 definitions are for (the current version
  111. #  of the makefile uses cc for both; this was tested and seems to work on
  112. #  the DEC Pro 380).  2.9 support basically follows the 4.1 path.
  113. #  Some 2.9 systems use "dir.h" for the directory header file, others
  114. #  will need to change this to "ndir.h".
  115. #
  116. #  The v7 and 2.9bsd versions assume I&D space on a PDP-11.  When building
  117. #  C-Kermit for v7 on a PDP-11, you should probably add the -i option to
  118. #  the link flags.  Without I&D space, overlays would probably have to be
  119. #  used (or code mapping a`la Pro/Venix if that's available).
  120. #
  121. #  Other systems require some special treatment:
  122. #
  123. #  For Ridge32 (ROS3.2), use "make sys3", but
  124. #  1. Use "CFLAGS = -DUXIII -i -O" "LNKFLAGS = -i"
  125. #  2. Don't #include <sys/file.h> in cku[tf]io.c.
  126. #
  127. #  For Whitechapel MG-1 Genix 1.3, use "make bsd", but
  128. #  1. In ckufio.c, have zkself() return 0 or call getpid, rather than getppid,
  129. #     or simply do "return(kill(0,9))" rather than "return(kill getppid(),1)".
  130. #  2. Wart reportedly can't process ckcpro.w; just work directly from ckcpro.c.
  131. #
  132. #  For Pixel 1000, use "make bsd", do step 1 for Whitechapel MG-1, above.
  133. #
  134. #  For Altos 986 with Xenix 3.0, use "make sys3", but
  135. #  1. Get rid of any "(void)"'s (they're only there for Lint anyway)
  136. #  2. In ckcdeb.h, define CHAR to be "char" rather than "unsigned char".
  137. #
  138. #  For Tandy 6000 running Sys III based Xenix (Xenix 3.xxx), use "make sys3"
  139. #  but insert "#include <sys/types.h>" in any file that that uses the "void"
  140. #  data type.
  141. #
  142. #  Other systems that are close to, but not quite, like Sys III or V, or
  143. #  4.x BSD or V7 -- look at some of the tricks used below and see if you
  144. #  can find a combination that works for you.
  145. #
  146. ##############################################################################
  147. #
  148. #  V7-specific variables.
  149. #  These are set up for Perkin-Elmer 3230 V7 Unix:
  150. PROC=proc
  151. DIRECT=
  152. NPROC=nproc
  153. NPTYPE=int
  154. BOOTFILE=/edition7
  155. #
  156. # ( For old Tandy TRS-80 Model 16A or 6000 V7-based Xenix, use PROC=_proc,
  157. #   DIRECT=-DDIRECT, NPROC=_Nproc, NPTYPE=short, BOOTFILE=/xenix )
  158. #
  159. ###########################################################################
  160. #
  161. #  Compile and Link variables:
  162. #
  163. LNKFLAGS=
  164. SHAREDLIB=
  165. CC= cc
  166. CC2= cc
  167. #
  168. ###########################################################################
  169. #
  170. # Dependencies Section:
  171. #
  172. make:
  173.     @echo 'Make what?  You must tell which system to make C-Kermit for.'
  174.  
  175. wermit: ckcmai.o ckucmd.o ckuusr.o ckuus2.o ckuus3.o ckcpro.o ckcfns.o \
  176.          ckcfn2.o ckucon.o ckutio.o ckufio.o ckudia.o ckuscr.o
  177.     $(CC2) $(LNKFLAGS) -o wermit ckcmai.o ckutio.o ckufio.o ckcfns.o \
  178.          ckcfn2.o ckcpro.o ckucmd.o ckuus2.o ckuus3.o ckuusr.o \
  179.          ckucon.o ckudia.o ckuscr.o $(LIBS)
  180.  
  181. ckcmai.o: ckcmai.c ckcker.h ckcdeb.h ckcsym.h
  182.  
  183. ckuusr.o: ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h
  184.  
  185. ckuus2.o: ckuus2.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h
  186.  
  187. ckuus3.o: ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h
  188.  
  189. ckucmd.o: ckucmd.c ckucmd.h ckcdeb.h
  190.  
  191. ckcpro.o: ckcpro.c ckcker.h ckcdeb.h
  192.  
  193. ckcpro.c: ckcpro.w wart
  194.     ./wart ckcpro.w ckcpro.c
  195.  
  196. ckcfns.o: ckcfns.c ckcker.h ckcdeb.h ckcsym.h
  197.  
  198. ckcfn2.o: ckcfn2.c ckcker.h ckcdeb.h ckcsym.h
  199.  
  200. ckufio.o: ckufio.c ckcker.h ckcdeb.h
  201.  
  202. ckutio.o: ckutio.c ckcdeb.h
  203.  
  204. ckucon.o: ckucon.c ckcker.h ckcdeb.h
  205.  
  206. wart: ckwart.o
  207.     $(CC) $(LNKFLAGS) -o wart ckwart.o
  208.  
  209. ckwart.o: ckwart.c
  210.  
  211. ckudia.o: ckudia.c ckcker.h ckcdeb.h ckucmd.h
  212.  
  213. ckuscr.o: ckuscr.c ckcker.h ckcdeb.h
  214. #
  215. ###########################################################################
  216. #
  217. # Make commands for specific systems:
  218. #
  219. #
  220. #Berkeley Unix 4.1 or 4.2, 4.3, also Ultrix-32 1.x, 2.0
  221. bsd:
  222.     make wermit "CFLAGS= -DBSD4 -DDEBUG -DTLOG"
  223.  
  224.  
  225. #Berkeley Unix 2.8, 2.9 for PDP-11s with I&D space, maybe also Ultrix-11???
  226. #If you have trouble with this, try removing "-l ndir".  If you still have
  227. #trouble, remove "-DDEBUG -DTLOG".  Or try defining CC and/or CC2 as "pcc"
  228. #instead of "cc".
  229. bsd29:
  230.     make wermit "CFLAGS= -DBSD29 -DDEBUG -DTLOG" \
  231.         "LNKFLAGS= -i -lndir" "CC= cc " "CC2= cc"
  232.  
  233. #Berkeley Unix 2.10 (Stan Barber, sob@bcm.tmc.edu)
  234. bsd210:
  235.     make wermit "CFLAGS= -DBSD29 -DDEBUG -DTLOG" -DLCKDIR \
  236.         "LNKFLAGS= -i " "CC= cc " "CC2= cc"
  237.  
  238. #SUN OS version 4.0 or later
  239. sunos4:
  240.     make wermit "CFLAGS= -DBSD4 -DSUNOS4 -DDEBUG -DTLOG"
  241.  
  242. #Version 7 Unix (see comments above)
  243. v7:
  244.     make wermit "CFLAGS=-DV7 -DDEBUG -DTLOG -DPROCNAME=\\\"$(PROC)\\\" \
  245.     -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
  246.     -DNPTYPE=$(NPTYPE) $(DIRECT)"
  247.  
  248. #System V R3, some things changed since Sys V R2...
  249. sys5r3:
  250.     make wermit "CFLAGS = -DSVR3 -DUXIII -DDEBUG -DTLOG -i -O" \
  251.         "LNKFLAGS = -i"
  252.  
  253. #In case they type "make sys5"...
  254. sys5:
  255.     make sys3
  256.  
  257. #Generic ATT System III or System V (with I&D space)
  258. sys3:
  259.     make wermit "CFLAGS = -DUXIII -DDEBUG -DTLOG -i -O" "LNKFLAGS = -i"
  260.  
  261. #Generic ATT System III or System V (no I&D space)
  262. sys3nid:
  263.     make wermit "CFLAGS = -DUXIII -DDEBUG -DTLOG -O" "LNKFLAGS ="
  264.  
  265. #AT&T 7300/Unix PC systems, sys3 but define symbol ATT7300
  266. sys3upc:
  267.     make wermit "CFLAGS = -DUXIII -DATT7300 -DDEBUG -DTLOG -i -O" \
  268.         "LNKFLAGS = -i"
  269.  
  270. #AT&T 3B2, 3B20-series computers running System V
  271. #  Only difference from sys3 is lock file stuff...
  272. att3bx:
  273.     make wermit "CFLAGS = -DUXIII -DATT3BX -DDEBUG -DTLOG -i -O" \
  274.         "LNKFLAGS = -i"
  275.  
  276. #HP 9000 series 300, 500, 800.
  277. hpux:
  278.     make wermit "CFLAGS = -DUXIII -DHPUX -DDEBUG -DTLOG -O" "LNKFLAGS ="
  279.  
  280. #Regulus on CIE Systems 680/20
  281. cie:
  282.     make wermit "CFLAGS = -DUXIII -DCIE -DDEBUG -DTLOG -O" "LNKFLAGS ="
  283.  
  284. #Microport Sys V for IBM PC/AT and clones
  285. mpsysv:
  286.     make wermit "CFLAGS= -O -DXENIX -DUXIII -DTLOG -Ml -i" \
  287.         "LNKFLAGS = -Ml -i"
  288.  
  289. #Microsoft "Xenix/286" e.g. for IBM PC/AT
  290. xenix:
  291.     make wermit "CFLAGS= -DXENIX -DUXIII -DDEBUG -DTLOG -F 3000 -i" \
  292.         "LNKFLAGS = -F 3000 -i"
  293.  
  294. #SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
  295. sco286:
  296.     make wermit "CFLAGS= -DXENIX -DUXIII -DDEBUG -DTLOG -F 3000 -i -M2le" \
  297.         "LNKFLAGS = -F 3000 -i -M2le"
  298.  
  299. #SCO Xenix 2.2.1 for IBM PC, XT, PS2/30, or other 8088 or 8086 machine
  300. sco86:
  301.     make wermit "CFLAGS= -DXENIX -DUXIII -DDEBUG -DTLOG -F 3000 -i -M0me" \
  302.         "LNKFLAGS = -F 3000 -i -M0me"
  303.  
  304. #SCO Xenix/386 2.2.2
  305. sco386:
  306.     make wermit "CFLAGS= -DXENIX -DUXIII -DDEBUG -DTLOG -Otcl  -i -M3e" \
  307.         "LNKFLAGS = -i"
  308.  
  309. #PC/IX, Interactive Corp System III for IBM PC/XT
  310. pcix:
  311.     make wermit \
  312.     "CFLAGS= -DPCIX -DUXIII -DISIII -DDEBUG -DTLOG -Dsdata=sdatax -O -i" \
  313.         "LNKFLAGS = -i"
  314.  
  315.  
  316. #Interactive Corp System III port in general --
  317. is3:
  318.     make wermit \
  319.         "CFLAGS = -DISIII -DUXIII -DDEBUG -DTLOG -Ddata=datax -O -i" \
  320.         "LNKFLAGS = -i"
  321.  
  322.  
  323. #Masscomp System III
  324. rtu:
  325.     make wermit "CFLAGS= -UFIONREAD -DUXIII -DDEBUG -DTLOG -O" \
  326.         "LNKFLAGS =" "LIBS= -ljobs"
  327.  
  328. #DEC Pro-3xx with Pro/Venix V1.0 or V1.1
  329. # Requires code-mapping on non-I&D-space 11/23 processor, plus some
  330. # fiddling to get interrupt targets into resident code section.
  331. provx1:
  332.     make wart "CFLAGS= -DPROVX1" "LNKFLAGS= "
  333.     make wermit "CFLAGS = -DPROVX1 -DDEBUG -DTLOG -md780" \
  334.         "LNKFLAGS= -u _sleep -lc -md780"
  335.  
  336. #NCR Tower 1632, OS 1.02
  337. tower1:
  338.     make wermit "CFLAGS= -DDEBUG -DTLOG -DTOWER1"
  339.  
  340. #Fortune 32:16, For:Pro 1.8 (mostly like 4.1bsd)
  341. ft18:
  342.     make wermit "CFLAGS= -DTLOG -DBSD4 -DFT18"
  343.  
  344. #Valid Scaldstar
  345. #Berkeleyish, but need to change some variable names.
  346. valid:
  347.     make wermit "CFLAGS= -DBSD4 -Dcc=ccx -DFREAD=1"
  348.  
  349. #IBM IX/370 on IBM 370 Series mainframes
  350. #Mostly like sys3, but should buffer packets.
  351. ix370:
  352.     make wermit "CFLAGS = -DIX370 -DUXIII -DDEBUG -DTLOG -i -O" \
  353.     "LNKFLAGS = -i"
  354.  
  355. #Amdahl UTS 2.4 on IBM 370 series compatible mainframes.
  356. #Mostly like V7, but can't do initrawq() buffer peeking.
  357. uts24:
  358.     make wermit "CFLAGS=-DV7 -DDEBUG -DTLOG -DPROCNAME=\\\"$(PROC)\\\" \
  359.     -DUTS24 -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
  360.     -DNPTYPE=$(NPTYPE) $(DIRECT)"
  361.  
  362. #BBN C/70 with IOS 2.0
  363. #Mostly Berkeley-like, but with some ATTisms
  364. c70:
  365.     make wermit "CFLAGS= -DBSD4 -DC70 -DDEBUG -DTLOG"
  366.  
  367. #Zilog ZEUS 3.21
  368. zilog:
  369.     make wermit "CFLAGS = -DUXIII -DZILOG -DTLOG -i -O" "LNKFLAGS = -i"
  370.  
  371. #CDC VX/VE 5.2.1
  372. vxve:
  373.     make wermit "CFLAGS = -DUXIII -DVXVE -i -O" "LNKFLAGS = -i"
  374.  
  375. #Clean up intermediate and object files
  376. clean:
  377.     -rm -f ckcmai.o ckucmd.o ckuusr.o ckuus2.o ckuus3.o ckcpro.o \
  378.     ckcfns.o ckcfn2.o ckucon.o ckutio.o ckufio.o ckudia.o ckuscr.o \
  379.     ckwart.o ckcpro.c
  380.  
  381. #Run Lint on this mess for the BSD version.
  382. lint:
  383.     -lint -x -DBSD4 -DDEBUG -DTLOG ck[cu]*.[hc] > ck.lint.bsd4
  384.  
  385.