📄 makefile
字号:
# For 2.9 BSD, the makefile may use pcc rather than cc for compiles; that's# what the CC and CC2 definitions are for (the current version of the# makefile uses cc for both; this was tested in version 4E of C-Kermit and# worked OK on the DEC Pro 380, but all bets are off for version 5A). 2.9# support basically follows the 4.1 path. Some 2.9 systems use "dir.h" for# the directory header file, others will need to change this to "ndir.h".## The v7 and 2.9bsd versions assume I&D space on a PDP-11. When building# C-Kermit for v7 on a PDP-11, you should probably add the -i option to the# link flags. Without I&D space, overlays will be necessary (if available),# or code segment mapping (a`la Pro/Venix) if that's available.## C-Kermit 5A (and 6.0?) can be built for 2.10 and 2.11BSD, using overlays,# but a separate makefile is used because this one is too big.################################################################################# V7-specific variables.# These are set up for Perkin-Elmer 3230 V7 Unix:#PROC=procDIRECT=NPROC=nprocNPTYPE=intBOOTFILE=/edition7## ( For old Tandy TRS-80 Model 16A or 6000 V7-based Xenix, use PROC=_proc,# DIRECT=-DDIRECT, NPROC=_Nproc, NPTYPE=short, BOOTFILE=/xenix )############################################################################## Compile and Link variables:## EXT is the extension (file type) for object files, normally o.# See MINIX entry for what to do if another filetype must be used.#EXT=o#LNKFLAGS=SHAREDLIB=CC= ccCC2= ccMAKE= makeSHELL=/bin/sh############################################################################# SAMPLE ONLY.# Easy installation. Modify this to suit your own computer's file organization# and permissions. If you don't have write access to the destination# directories, "make install" will fail. In many cases, a real installation# will also require you to chown / chgrp for the UUCP lockfile and/or tty# devices, and perhaps also to chmod +s the appropriate permission fields.WERMIT = makewhatDESTDIR =BINDIR = /usr/local/binMANDIR = /usr/man/manlMANEXT = lALL = $(WERMIT)all: $(ALL)install: $(ALL) cp wermit $(DESTDIR)$(BINDIR)/kermit# The following can fail if the program image was already stripped,# for example by the link flags in the makefile entry.# strip $(DESTDIR)$(BINDIR)/kermit chmod 755 $(DESTDIR)$(BINDIR)/kermit cp ckuker.nr $(DESTDIR)$(MANDIR)/kermit.$(MANEXT)# To make sure 'man' notices the new source file and doesn't keep# showing the old formatted version, remove the old formatted version,# something like this:# rm -f $(DESTDIR)$(MANDIR)/../cat$(MANEXT)/kermit.$(MANEXT)# or this (which requires CATDIR to be defined):# rm -f $(DESTDIR)$(CATDIR)/kermit.$(MANEXT) chmod 644 $(DESTDIR)$(MANDIR)/kermit.$(MANEXT)makewhat: @echo 'make what? You must tell which system to make C-Kermit for.' @echo Examples: make hpux90, make sys5r4, make solaris2x, etc. @echo Please read the comments at the beginning of the makefile.############################################################################# Dependencies Section:manpage: ckuker.nrwermit: ckcmai.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) ckuus3.$(EXT) \ ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \ ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) ckcfns.$(EXT) \ ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) ckucon.$(EXT) \ ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \ ckcnet.$(EXT) ckusig.$(EXT) $(CC2) $(LNKFLAGS) -o wermit ckcmai.$(EXT) ckutio.$(EXT) \ ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) \ ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) ckuus2.$(EXT) \ ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \ ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckuusr.$(EXT) \ ckucon.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) ckcnet.$(EXT) \ ckusig.$(EXT) $(LIBS)#Malloc Debugging versionmermit: ckcmdb.$(EXT) ckcmai.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \ ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckuus6.$(EXT) \ ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) ckcpro.$(EXT) \ ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \ ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \ ckuscr.$(EXT) ckcnet.$(EXT) ckusig.$(EXT) $(CC2) $(LNKFLAGS) -o mermit ckcmdb.$(EXT) ckcmai.$(EXT) \ ckutio.$(EXT) ckufio.$(EXT) ckcfns.$(EXT) ckcfn2.$(EXT) \ ckcfn3.$(EXT) ckuxla.$(EXT) ckcpro.$(EXT) ckucmd.$(EXT) \ ckuus2.$(EXT) ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \ ckuus6.$(EXT) ckuus7.$(EXT) ckuusx.$(EXT) ckuusy.$(EXT) \ ckuusr.$(EXT) ckucon.$(EXT) ckudia.$(EXT) ckuscr.$(EXT) \ ckcnet.$(EXT) ckusig.$(EXT) $(LIBS)############################################################################ man page...## WARNING: Using "cc -E" to preprocess the man page is not portable, but it# works OK in SunOS 4.1.x, HP-UX, etc. We use the preprocessor to produce# custom man pages based on ifdef, else, and endif directives. But the# preprocessor replaces omitted lines by blank lines and comment lines, so we# use grep to filter them out. THIS MEANS THAT THE SOURCE FILE, ckuker.cpp,# MUST NOT CONTAIN ANY BLANK LINES!#ckuker.nr: ckuker.cpp $(CC) $(CFLAGS) -E ckuker.cpp |grep -v "^$$" |grep -v "^\#" > ckuker.nr############################################################################ Dependencies for each module...#ckcmai.$(EXT): ckcmai.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcnet.h ckcsig.h \ ckuusr.hckcpro.$(EXT): ckcpro.c ckcker.h ckcdeb.h ckcsym.h ckcasc.hckcpro.c: ckcpro.w wart ckcdeb.h ckcsym.h ckcasc.h ckcker.h ./wart ckcpro.w ckcpro.cckcfns.$(EXT): ckcfns.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \ ckuxla.hckcfn2.$(EXT): ckcfn2.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckuxla.hckcfn3.$(EXT): ckcfn3.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \ ckuxla.hckuxla.$(EXT): ckuxla.c ckcker.h ckcsym.h ckcdeb.h ckcxla.h ckuxla.hckuusr.$(EXT): ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcsym.h ckcdeb.h ckcxla.h \ ckuxla.h ckcasc.h ckcnet.hckuus2.$(EXT): ckuus2.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ ckcasc.h ckcnet.h ckcsym.hckuus3.$(EXT): ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ ckcasc.h ckcnet.h ckcsym.hckuus4.$(EXT): ckuus4.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ ckcasc.h ckcnet.h ckuver.h ckcsym.hckuus5.$(EXT): ckuus5.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \ ckcsym.hckuus6.$(EXT): ckuus6.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcnet.h \ ckcsym.hckuus7.$(EXT): ckuus7.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ ckcasc.h ckcnet.h ckcsym.hckuusx.$(EXT): ckuusx.c ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcsym.h ckcsig.hckuusy.$(EXT): ckuusy.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.hckucmd.$(EXT): ckucmd.c ckcasc.h ckucmd.h ckcdeb.h ckcsym.hckufio.$(EXT): ckufio.c ckcdeb.h ckuver.h ckcsym.hckutio.$(EXT): ckutio.c ckcdeb.h ckcnet.h ckuver.h ckcsym.hckucon.$(EXT): ckucon.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsym.hckcnet.$(EXT): ckcnet.c ckcdeb.h ckcker.h ckcnet.h ckcsym.h ckcsig.hwart: ckwart.$(EXT) $(CC) $(LNKFLAGS) -o wart ckwart.$(EXT) $(LIBS)ckcmdb.$(EXT): ckcmdb.c ckcdeb.h ckcsym.hckwart.$(EXT): ckwart.cckudia.$(EXT): ckudia.c ckcker.h ckcdeb.h ckucmd.h ckcasc.h ckcsym.h ckcsig.hckuscr.$(EXT): ckuscr.c ckcker.h ckcdeb.h ckcasc.h ckcsym.h ckcsig.hckusig.$(EXT): ckusig.c ckcasc.h ckcdeb.h ckcker.h ckcnet.h ckuusr.h ckcsig.h############################################################################# Entries to make C-Kermit for specific systems.## Put the ones that need short makefiles first.bsd210: @echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.10BSD.bsd211: @echo Please use ckubs2.mak to build C-Kermit $(CKVER) for 2.11BSD.#Apollo Aegis 9.x. Includes TCP/IP support.#You can also add processor-dependent optimization switches like -M570.aegis: @echo Making C-Kermit $(CKVER) for Apollo Aegis 9.x... $(MAKE) wermit "CFLAGS= -DBSD4 -DDYNAMIC -DTCPSOCKET \ -DCK_CURSES -O $(KFLAGS)" "LIBS = -lcurses -ltermcap"#Apple Mac II, A/UX pre-3.0#Warning, if "send *" doesn't work, try the auxufs makefile entry below.aux: @echo Making C-Kermit $(CKVER) for Macintosh A/UX... $(MAKE) wermit "CFLAGS = -DAUX -DDYNAMIC -DTCPSOCKET \ $(KFLAGS) -i -O" "LNKFLAGS = -i"#Apple Mac II, A/UX pre-3.0, compiled with gccauxgcc: @echo Making C-Kermit $(CKVER) for Macintosh A/UX... $(MAKE) wermit "CFLAGS = -DAUX -DDYNAMIC -DTCPSOCKET \ -traditional $(KFLAGS) -i -O" "LNKFLAGS = " "CC = gcc" "CC2 = gcc"#Apple Mac II, A/UX, pre-3.0, but with ufs file volumes, uses <dirent.h>.auxufs: @echo Making C-Kermit $(CKVER) for Macintosh A/UX... $(MAKE) wermit "CFLAGS = -DAUX -DDYNAMIC -DTCPSOCKET -DDIRENT \ $(KFLAGS) -i -O" "LNKFLAGS = -i"#Apple Mac II, A/UX 3.0, compiled with gccaux3gcc: @echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0... $(MAKE) wermit "CFLAGS = -DAUX -DHDBUUCP -DLFDEVNO -DDYNAMIC \ -DTCPSOCKET -DDIRENT $(KFLAGS) -O2" "LNKFLAGS = -s" "LIBS = $(LIBS)" \ "CC=gcc -pipe -traditional" "CC2=gcc -pipe -traditional"#Apple Mac II, A/UX 3.0, compiled with gcc, uses cursesaux3cgcc: @echo Making C-Kermit $(CKVER) for Macintosh A/UX 3.0... $(MAKE) "MAKE=$(MAKE)" aux3gcc "KFLAGS=$(KFLAGS) -DCK_CURSES" \ "LIBS = -lcurses $(LIBS)"#Bell Labs Research UNIX V10#Can't add TCP/IP because there is no sockets library. It would have to#be done using streams, but there is no code in C-Kermit for that.#Remove -DNOJC if desired (if your system has csh, ksh, or bash).bellv10: @echo Making C-Kermit $(CKVER) for Bell Labs Research UNIX V10... $(MAKE) wermit "CFLAGS= -DBELLV10 -DBSD4 -DNDIR -DDYNAMIC -DNOJC \ -DNOSYSIOCTLH -DNOSETREU -DNOSETBUF -DNOCSETS -MINIDIAL $(KFLAGS)"#Berkeley Unix 4.1bsd41: @echo Making C-Kermit $(CKVER) for 4.1BSD... $(MAKE) wermit "CFLAGS= -DBSD41" "LIBS = -ljobs"#Berkeley 4.2, 4.3, also Ultrix-32 1.x, 2.x, 3.x, many others# Add -O, -DDYNAMIC, -s, etc, if they work.# If you have a version of BSD but signal() is void rather than int,# "make bsd KFLAGS=-DSIG_V".bsd: @echo Making C-Kermit $(CKVER) for 4.2BSD... $(MAKE) wermit "CFLAGS= -DBSD4 -DTCPSOCKET $(KFLAGS)"#Berkeley 4.2, 4.3, minimum sizebsdm: @echo Making C-Kermit $(CKVER) for 4.2BSD... $(MAKE) wermit "CFLAGS= -O -DBSD4 -DDYNAMIC -DNODIAL -DNOHELP \ -DNODEBUG -DNOTLOG -DNOSCRIPT -DNOCSETS -DNOICP $(KFLAGS)" \ "LNKFLAGS = -s"#Berkeley Unix with HoneyDanBer UUCPbsdhdb: @echo Making C-Kermit $(CKVER) for 4.2BSD with HDB UUCP... $(MAKE) wermit "CFLAGS= -DHDBUUCP -DBSD4 -DTCPSOCKET $(KFLAGS)"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -