Annotation of researchv10dc/lbin/kermit/makefile, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.