|
|
1.1 ! root 1: # ! 2: # Copyright (c) 1988 Regents of the University of California. ! 3: # All rights reserved. ! 4: # ! 5: # Redistribution and use in source and binary forms are permitted ! 6: # provided that this notice is preserved and that due credit is given ! 7: # to the University of California at Berkeley. The name of the University ! 8: # may not be used to endorse or promote products derived from this ! 9: # software without specific prior written permission. This software ! 10: # is provided ``as is'' without express or implied warranty. ! 11: # ! 12: # @(#)makefile 3.3 (Berkeley) 3/28/88 ! 13: # ! 14: # Makefile for tn3270 and friends... ! 15: # ! 16: # This is the makefile for tn3270. Note that we use ../telnet.c ! 17: # (compiled with special options; see below) to provide the telnet ! 18: # support we need. ! 19: # ! 20: # The following are the defines that may be passed (via the cc ! 21: # -D option) to the compiler. ! 22: # ! 23: # The first group relate only to ../telnet.c: ! 24: # ! 25: # TN3270 - This is to be linked with tn3270. Necessary ! 26: # for creating tn3270. ! 27: # ! 28: # NOT43 - Allows the program to compile and run on ! 29: # a 4.2BSD system. ! 30: # ! 31: # PUTCHAR - Within tn3270, on a NOT43 system, ! 32: # allows the use of the 4.3 curses ! 33: # (greater speed updating the screen). ! 34: # You need the 4.3 curses for this to work. ! 35: # ! 36: # FD_SETSIZE - On whichever system, if this isn't defined, ! 37: # we patch over the FD_SET, etc., macros with ! 38: # some homebrewed ones. ! 39: # ! 40: # SO_OOBINLINE - This is a socket option which we would like ! 41: # to set to allow TCP urgent data to come ! 42: # to us "inline". This is NECESSARY for ! 43: # CORRECT operation, and desireable for ! 44: # simpler operation. ! 45: # ! 46: # LNOFLSH - Detects the presence of the LNOFLSH bit ! 47: # in the tty structure. ! 48: # ! 49: # ! 50: # Here are some which are used throughout the system: ! 51: # ! 52: # unix - Compiles in unix specific stuff. ! 53: # ! 54: # msdos - Compiles in msdos specific stuff. ! 55: # ! 56: ! 57: # msdos versus unix defines ! 58: O = .o ! 59: #PC_O = .obj ! 60: ! 61: X = ! 62: #PC_X = .exe ! 63: ! 64: L = ! 65: #PC_L = -link ! 66: ! 67: CC = cc ! 68: #PC_CC = cl ! 69: ! 70: MV = mv ! 71: #PC_MV = rename ! 72: ! 73: RM = rm -f ! 74: #PC_RM= erase ! 75: ! 76: LINT_ARGS = ! 77: #PC_LINT_ARGS = -DLINT_ARGS ! 78: ! 79: DEBUG_FLAGS = -g ! 80: #PC_DEBUG_FLAGS = -Zi -Od ! 81: ! 82: AR = ar ! 83: AR1 = cr ! 84: AR2 = ! 85: AR3 = ! 86: #PC_AR = lib ! 87: #PC_AR1 = ! 88: #PC_AR2 = + ! 89: #PC_AR3 = ";" ! 90: ! 91: RANLIB = ranlib ! 92: #PC_RANLIB = echo "Done with " ! 93: ! 94: ! 95: PRINT = print ! 96: ACTION = sccs tell ! 97: ! 98: DEFINES = ${LINT_ARGS} ! 99: ! 100: INCLUDES = -I. -I.. ! 101: ! 102: OPTIMIZE = -O ! 103: OPTIMIZE = ${DEBUG_FLAGS} ! 104: ! 105: CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES) ! 106: ! 107: # Lint flags ! 108: LINTFLAGS = -hbxaz ! 109: # How to install the bloody thing... ! 110: ! 111: DESTDIR= ! 112: ! 113: BINDIR = $(DESTDIR)/usr/ucb ! 114: ! 115: # Names for the terminal libraries... ! 116: LIBCURSES = -lcurses ! 117: LIBTERM = -ltermlib ! 118: ! 119: #PC_LIBCURSES = ! 120: #PC_LIBTERM = ! 121: ! 122: # The source files... ! 123: ALLH = telnet.ext ! 124: ! 125: TNMAIN = ../telnet.c ! 126: TNMAIN = telnet.c ! 127: MSMAIN = ascii/mset.c ! 128: ! 129: ALLC = ${TNMAIN} ! 130: ! 131: ALLO = telnet$O mset$O ! 132: ! 133: ALLPRINT = ${ALLH} ${ALLC} ! 134: ! 135: ALLSOURCE = ${ALLPRINT} makefile makefile.mak makefile_4.2 README ! 136: ! 137: SYS = sys_curses ! 138: #PC_SYS = sys_dos ! 139: ! 140: # The places where the various components live... ! 141: ! 142: SUBDIR = api ascii ctlr general ${SYS} ! 143: ! 144: # The following are directories we don't do regular make's in, but ! 145: # we do make everywhere, print, and sourcelist in. ! 146: ! 147: EXTRADIR = arpa sys_dos tools utilities ! 148: ! 149: # The libraries we use. The order here is important. ! 150: # syslib.a and ctlrlib.a should come first, then the rest. ! 151: SUBLIB = ${SYS}/syslib.a ctlr/ctlrlib.a \ ! 152: ascii/asciilib.a general/generallib.a ! 153: ! 154: .s.o: ! 155: /lib/cpp -E $< | as -o $@ ! 156: ! 157: .c.obj: ! 158: ${CC} ${CFLAGS} -c $< ! 159: ! 160: all: FRC tn3270$X mset$X ! 161: ! 162: FRC: ! 163: for i in ${SUBDIR}; \ ! 164: do (cd $$i; make ${MFLAGS} "CFLAGS=${CFLAGS}"); done ! 165: ! 166: tn3270$X: telnet$O ${SUBLIB} api/apilib.a ! 167: ${CC} ${CFLAGS} -o tn3270 telnet$O \ ! 168: $L ${SUBLIB} api/apilib.a $(LIBCURSES) $(LIBTERM) ! 169: ! 170: #PC_tn3270$X: ! 171: #PC_ link <@< ! 172: #PC_ telnet ! 173: #PC_ tn3270 ! 174: #PC_ nul ! 175: #PC_ ${SUBLIB} api/apilib.a+ ! 176: #PC_ \lib\ublib\ubtcp ! 177: #PC_ _PC_< ! 178: ! 179: mset$X: mset$O ascii/map3270$O ! 180: ${CC} ${CFLAGS} -o mset mset$O ascii/map3270$O $L api/apilib.a ! 181: ! 182: telnet$O: $(TNMAIN) ! 183: $(CC) $(CFLAGS) -DTN3270 -c $(TNMAIN) ! 184: ! 185: mset$O: $(MSMAIN) ! 186: $(CC) $(CFLAGS) -c $(MSMAIN) ! 187: ! 188: install: tn3270$X mset$X ! 189: install -m 755 -o bin -g bin -s tn3270 $(BINDIR) ! 190: install -m 755 -o bin -g bin -s mset $(BINDIR) ! 191: ! 192: action: ! 193: ${ACTION} ! 194: ! 195: everywhere: action ! 196: for i in ${SUBDIR} ${EXTRADIR}; \ ! 197: do (echo "[$$i]"; cd $$i; make ${MFLAGS} action \ ! 198: "ACTION=${ACTION}"); done ! 199: ! 200: clean: ! 201: for i in $(ALLO) mset tn3270 errs makefile.bak; \ ! 202: do (${RM} $$i); done ! 203: for i in ${SUBDIR} ${EXTRADIR}; \ ! 204: do (cd $$i; make ${MFLAGS} clean); done ! 205: ! 206: sccsclean: ! 207: -sccs clean ! 208: -sccs get makefile ! 209: for i in ${SUBDIR} ${EXTRADIR}; \ ! 210: do (cd $$i; make ${MFLAGS} sccsclean); done ! 211: ! 212: print: ! 213: ${PRINT} ${ALLPRINT} ! 214: for i in ${SUBDIR} ${EXTRADIR}; \ ! 215: do (cd $$i; make ${MFLAGS} "PRINT=${PRINT}" print); done ! 216: ! 217: tags: ${ALLC} ${ALLH} ! 218: ctags -t ${ALLC} ${ALLH} ! 219: ! 220: sourcelist: ${ALLSOURCE} ! 221: @for i in ${ALLSOURCE}; \ ! 222: do (echo ${DIRPATH}$$i); done ! 223: @for i in ${SUBDIR} ${EXTRADIR}; \ ! 224: do (cd $$i; make ${MFLAGS} "DIRPATH=${DIRPATH}$$i/" \ ! 225: sourcelist); done ! 226: ! 227: lint: ! 228: lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 \ ! 229: ${TNMAIN} -lcurses ! 230: lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${MSMAIN} map3270.c -lcurses ! 231: ! 232: makefiles.pc: tools/mkmake ! 233: for i in . ${SUBDIR} ${EXTRADIR}; \ ! 234: do (sed -e "s/lib\.a/.lib/g" -e "s/^#PC_//" < $$i/makefile | \ ! 235: ./tools/mkmake | \ ! 236: sed -e "sx/x\\\\xg" -e "s/[ ]*_PC_//" > $$i/makefile.mak); \ ! 237: done ! 238: ! 239: tools/mkmake: ! 240: (cd tools; make mkmake) ! 241: ! 242: .DEFAULT: ! 243: sccs get $< ! 244: ! 245: depend: thisdepend ! 246: for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done ! 247: ! 248: thisdepend: ! 249: echo > eddep.c ! 250: grep '^#include' ${ALLC} eddep.c | grep -v '<' | \ ! 251: sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ ! 252: -e 's/\.c/$$O/' | \ ! 253: awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ ! 254: else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ ! 255: else rec = rec " " $$2 } } \ ! 256: END { print rec } ' > makedep ! 257: echo '$$r makedep' >>eddep ! 258: echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep ! 259: echo '$$r makedep' >>eddep ! 260: echo 'w' >>eddep ! 261: -rm -f makefile.bak ! 262: cp makefile makefile.bak ! 263: ed - makefile < eddep ! 264: rm eddep makedep eddep.c ! 265: ! 266: # DO NOT DELETE THIS LINE ! 267: ! 268: telnet$O: ascii/termin.ext ctlr/screen.h ctlr/oia.h ctlr/options.ext ! 269: telnet$O: ctlr/outbound.ext general/globals.h telnet.ext general/general.h
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.