Annotation of 43BSDReno/usr.bin/tn3270/distribution/makefile_4.2, revision 1.1.1.1

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

unix.superglobalmegacorp.com

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