Annotation of 43BSDTahoe/ucb/tn3270/makefile_4.2, revision 1.1.1.1

1.1       root        1: # This makefile defines -DNOT43, to correct for compiler errors
                      2: # involving assignments to variables which are pointers to functions
                      3: # which return "void".
                      4: 
                      5: # Makefile for tn3270 and friends...
                      6: # @(#)makefile 3.1  10/29/86
                      7: #
                      8: #      This is the makefile for tn3270.  Note that we use ../telnet.c
                      9: # (compiled with special options; see below) to provide the telnet
                     10: # support we need.
                     11: #
                     12: #      The following are the defines that may be passed (via the cc
                     13: # -D option) to the compiler.
                     14: #
                     15: #      The first group relate only to ../telnet.c:
                     16: #
                     17: #      TN3270          -       This is to be linked with tn3270.  Necessary
                     18: #                              for creating tn3270.
                     19: #
                     20: #      NOT43           -       Allows the program to compile and run on
                     21: #                              a 4.2BSD system.
                     22: #
                     23: #      PUTCHAR         -       Within tn3270, on a NOT43 system,
                     24: #                              allows the use of the 4.3 curses
                     25: #                              (greater speed updating the screen).
                     26: #                              You need the 4.3 curses for this to work.
                     27: #
                     28: #      FD_SETSIZE      -       On whichever system, if this isn't defined,
                     29: #                              we patch over the FD_SET, etc., macros with
                     30: #                              some homebrewed ones.
                     31: #
                     32: #      SO_OOBINLINE    -       This is a socket option which we would like
                     33: #                              to set to allow TCP urgent data to come
                     34: #                              to us "inline".  This is NECESSARY for
                     35: #                              CORRECT operation, and desireable for
                     36: #                              simpler operation.
                     37: #
                     38: #      LNOFLSH         -       Detects the presence of the LNOFLSH bit
                     39: #                              in the tty structure.
                     40: #
                     41: #
                     42: #      Here are some which are used throughout the system:
                     43: #
                     44: #      unix            -       Compiles in unix specific stuff.
                     45: #
                     46: #      msdos           -       Compiles in msdos specific stuff.
                     47: #
                     48: 
                     49: # msdos versus unix defines
                     50: O      = .o
                     51: #PC_O  = .obj
                     52: 
                     53: X      =
                     54: #PC_X  = .exe
                     55: 
                     56: L      =
                     57: #PC_L  = -link
                     58: 
                     59: CC     = cc
                     60: #PC_CC = cl
                     61: 
                     62: MV     = mv
                     63: #PC_MV = rename
                     64: 
                     65: RM     = rm -f
                     66: #PC_RM= erase
                     67: 
                     68: LINT_ARGS =
                     69: #PC_LINT_ARGS = -DLINT_ARGS
                     70: 
                     71: DEBUG_FLAGS = -g
                     72: #PC_DEBUG_FLAGS = -Zi -Od
                     73: 
                     74: AR     = ar
                     75: AR1    = cr
                     76: AR2    =
                     77: AR3    =
                     78: #PC_AR = lib
                     79: #PC_AR1        =
                     80: #PC_AR2        = +
                     81: #PC_AR3        = ";"
                     82: 
                     83: RANLIB = ranlib
                     84: #PC_RANLIB = echo "Done with "
                     85: 
                     86: 
                     87: PRINT  = print
                     88: ACTION = sccs tell
                     89: 
                     90: DEFINES = -DNOT43 ${LINT_ARGS}
                     91: 
                     92: INCLUDES = -I. -I..
                     93: 
                     94: OPTIMIZE = -O
                     95: OPTIMIZE = ${DEBUG_FLAGS}
                     96: 
                     97: CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
                     98: 
                     99: # Lint flags
                    100: LINTFLAGS      = -hbxaz
                    101: # How to install the bloody thing...
                    102: 
                    103: DESTDIR=
                    104: 
                    105: BINDIR         = $(DESTDIR)/usr/ucb
                    106: ETCDIR         = $(DESTDIR)/etc
                    107: MANDIR         = $(DESTDIR)/usr/man/man
                    108: 
                    109: # Names for the terminal libraries...
                    110: LIBCURSES      = -lcurses
                    111: LIBTERM                = -ltermlib
                    112: 
                    113: #PC_LIBCURSES  =
                    114: #PC_LIBTERM    =
                    115: 
                    116: # The source files...
                    117: ALLH = telnet.ext
                    118: 
                    119: TNMAIN = ../telnet.c
                    120: TNMAIN = telnet.c
                    121: MSMAIN = ascii/mset.c
                    122: 
                    123: ALLC = ${TNMAIN}
                    124: 
                    125: ALLO   = telnet$O mset$O
                    126: 
                    127: ALLPRINT =     ${ALLH} ${ALLC}
                    128: 
                    129: ALLSOURCE =    ${ALLPRINT} makefile makefile.mak README
                    130: 
                    131: SYS    = sys_curses
                    132: #PC_SYS        = sys_dos
                    133: 
                    134: # The places where the various components live...
                    135: 
                    136: SUBDIR =       api ascii ctlr general ${SYS}
                    137: 
                    138: # The following are directories we don't do regular make's in, but
                    139: # we do make everywhere, print, and sourcelist in.
                    140: 
                    141: EXTRADIR =     arpa sys_dos tools utilities
                    142: 
                    143: # The libraries we use.  The order here is important.
                    144: # syslib.a and ctlrlib.a should come first, then the rest.
                    145: SUBLIB =       ${SYS}/syslib.a ctlr/ctlrlib.a \
                    146:                ascii/asciilib.a general/generallib.a
                    147: 
                    148: .s.o:
                    149:        /lib/cpp -E $< | as -o $@
                    150: 
                    151: .c.obj:
                    152:        ${CC} ${CFLAGS} -c $<
                    153: 
                    154: all:   FRC tn3270$X mset$X
                    155: 
                    156: FRC:
                    157:        for i in ${SUBDIR}; \
                    158:                do (cd $$i; make ${MFLAGS} "CFLAGS=${CFLAGS}"); done
                    159: 
                    160: tn3270$X:      telnet$O ${SUBLIB} api/apilib.a
                    161:        ${CC} ${CFLAGS} -o tn3270 telnet$O \
                    162:                $L ${SUBLIB} api/apilib.a $(LIBCURSES) $(LIBTERM)
                    163: 
                    164: #PC_tn3270$X:
                    165: #PC_   link <@<
                    166: #PC_   telnet
                    167: #PC_   tn3270
                    168: #PC_   nul
                    169: #PC_   ${SUBLIB} api/apilib.a+
                    170: #PC_   \lib\ublib\ubtcp
                    171: #PC_   _PC_<
                    172: 
                    173: mset$X:        mset$O ascii/map3270$O
                    174:        ${CC} ${CFLAGS} -o mset mset$O ascii/map3270$O $L api/apilib.a
                    175: 
                    176: telnet$O:      $(TNMAIN)
                    177:        $(CC) $(CFLAGS) -DTN3270 -c $(TNMAIN)
                    178: 
                    179: mset$O:        $(MSMAIN)
                    180:        $(CC) $(CFLAGS) -c $(MSMAIN)
                    181: 
                    182: install:
                    183:        install -s tn3270 $(BINDIR)
                    184:        install -s mset $(BINDIR)
                    185:        if [ ! -f ${ETCDIR}/map3270 ]; then \
                    186:                install -c -m 444 map3270.dat ${ETCDIR}/map3270; \
                    187:        fi
                    188: #      install -c -m 444 man/tn3270.1 $(MANDIR)1/tn3270.1
                    189: #      install -c -m 444 man/mset.1 $(MANDIR)1/mset.1
                    190: #      install -c -m 444 man/map3270.5 $(MANDIR)5/map3270.5
                    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

unix.superglobalmegacorp.com

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