only executable by group dialer
[unix-history] / usr / src / usr.bin / tip / Makefile
index 38b9984..2674197 100644 (file)
@@ -1,22 +1,43 @@
-#      Makefile        4.7     82/11/07
 #
 #
-# makefile for intermachine communications package
+# Copyright (c) 1988 The Regents of the University of California.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms are permitted
+# provided that the above copyright notice and this paragraph are
+# duplicated in all such forms and that any documentation,
+# advertising materials, and other materials related to such
+# distribution and use acknowledge that the software was developed
+# by the University of California, Berkeley.  The name of the
+# University may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+#      @(#)Makefile    5.7 (Berkeley) %G%
+#
+# make file for intermachine communications package
 #
 # Files are:
 #      /etc/remote             remote host description file
 #      /etc/phones             phone number file, owned by ${OWNER} and
 #
 # Files are:
 #      /etc/remote             remote host description file
 #      /etc/phones             phone number file, owned by ${OWNER} and
-#                                mode 644
+#                                mode 6??
 #      ${ADM}/aculog           ACU accounting file, owned by ${OWNER} and
 #      ${ADM}/aculog           ACU accounting file, owned by ${OWNER} and
-#                                mode 644 {if ACULOG defined}
+#                                mode 6?? {if ACULOG defined}
 # Presently supports:
 #      BIZCOMP
 #      DEC DF02-AC, DF03-AC
 #      DEC DN-11/Able Quadracall
 # Presently supports:
 #      BIZCOMP
 #      DEC DF02-AC, DF03-AC
 #      DEC DN-11/Able Quadracall
-#      VENTEL intelligent modem
+#      HAYES and Hayes emulators
+#      USR COURIER (2400 baud)
+#      VENTEL 212+
+#      VADIC 831 RS232 adaptor
+#      VADIC 3451
+# (drivers are located in aculib.a)
 #
 # Configuration defines:
 #      DF02, DF03, DN11        ACU's supported
 #
 # Configuration defines:
 #      DF02, DF03, DN11        ACU's supported
-#        BIZ1031, BIZ1022, VENTEL
+#        BIZ1031, BIZ1022, VENTEL, V831, V3451, HAYES, COURIER
 #      ACULOG                  turn on tip logging of ACU use
 #      PRISTINE                no phone #'s put in ACU log file
 #      CONNECT                 worthless command
 #      ACULOG                  turn on tip logging of ACU use
 #      PRISTINE                no phone #'s put in ACU log file
 #      CONNECT                 worthless command
 #                              writes on local side
 #      BUFSIZ                  buffer sizing from stdio, must be fed
 #                              explicitly to remcap.c if not 1024
 #                              writes on local side
 #      BUFSIZ                  buffer sizing from stdio, must be fed
 #                              explicitly to remcap.c if not 1024
-#      VMUNIX                  allow VMUNIX tty stuff and job control
+ADM=   usr/adm
+CONFIG=        -DV831 -DVENTEL -DHAYES -DCOURIER
+CFLAGS=        -O -DDEFBR=1200 -DDEFFS=BUFSIZ -DACULOG -DPRISTINE
+LIBC=  /lib/libc.a
+SRCS=  acu.c acutab.c cmds.c cmdtab.c cu.c hunt.c log.c partab.c remcap.c \
+       remote.c tip.c tipout.c uucplock.c value.c vars.c
+OBJS=  acu.o acutab.o cmds.o cmdtab.o cu.o hunt.o log.o partab.o remcap.o \
+       remote.o tip.o tipout.o uucplock.o value.o vars.o
+MAN=   tip.0
 
 
-ADM=${DESTDIR}/usr/adm
-BIN=${DESTDIR}/usr/ucb
-OWNER=uucp
-CFLAGS=-O -DDEFBR=300 -DDEFFS=BUFSIZ -DVENTEL -DACULOG
-LDFLAGS=
-OBJECTS=acu.o acutab.o biz22.o biz31.o cmds.o cmdtab.o cu.o df.o dn11.o hunt.o \
-       lock.o log.o remote.o tip.o tipout.o value.o vars.o ventel.o
-SOURCES=acu.c acutab.c biz22.c biz31.c cmds.c cmdtab.c cu.c df.c dn11.c hunt.c \
-       lock.c log.c remcap.c remote.c tip.c tipout.c uucplock.c value.c  \
-       vars.c ventel.c
-CXREF=/usr/ucb/ctags -xw
+all: aculib/aculib.a tip
 
 
-tip:   ${OBJECTS} remcap.o uucplock.o
-       ${CC} -o tip ${LDFLAGS} ${OBJECTS} remcap.o uucplock.o
-       rm -f cu
-       ln tip cu
+tip: ${OBJS} ${LIBC}
+       ${CC} -o $@ ${OBJS} aculib/aculib.a
 
 
-all:   tip aculog
+# acutab is configuration dependent, and so depends on the makefile
+acutab.o: Makefile
+acutab.o: acutab.c
+       ${CC} -c ${CFLAGS} ${CONFIG} acutab.c
 
 
-install: all
-       cp tip ${BIN}/tip
-       chown ${OWNER} ${BIN}/tip
-       chmod 4711 ${BIN}/tip
-#      cp aculog /etc/aculog
-#      chown ${OWNER} /etc/aculog
-#      chmod 4711 /etc/aculog
-#      cp /dev/null ${ADM}/aculog
-#      chown ${OWNER} ${ADM}/aculog
-#      chmod 600 ${ADM}/aculog
-       @echo "create /etc/remote and /etc/phones"
+# remote.o depends on the makefile because of DEFBR and DEFFS
+# log.o depends on the makefile because of ACULOG
+log.o remote.o: Makefile
 
 
-aculog:        aculog.c
-       ${CC} -o aculog ${LDFLAGS} aculog.c
+aculib/aculib.a: FRC
+       cd aculib; make ${MFLAGS}
 
 
-${OBJECTS}: tip.h
+clean:
+       rm -f ${OBJS} core tip
+       cd aculib; make ${MFLAGS} clean
 
 
-remcap.o: remcap.c
-       ${CC} -c -DBUFSIZ=1024 ${CFLAGS} remcap.c
+cleandir: clean
+       rm -f ${MAN} tags .depend
+       cd aculib; make ${MFLAGS} cleandir
 
 
-tags:  ${SOURCES} tip.h
-       ctags -w ${SOURCES} tip.h
+depend:
+       mkdep ${CFLAGS} ${SRCS}
+       cd aculib; make ${MFLAGS} depend
 
 
-clean:
-       rm -f aculog tip cu *.o
+install: ${MAN}
+       cd aculib; make ${MFLAGS} install
+       install -s -o uucp -g dialer -m 4710 tip ${DESTDIR}/usr/bin/tip
+       rm -f ${DESTDIR}/usr/bin/cu
+       ln ${DESTDIR}/usr/bin/tip ${DESTDIR}/usr/bin/cu
+       install -c -o bin -g bin -m 444 tip.0 ${DESTDIR}/usr/man/cat1
+       rm -f ${DESTDIR}/usr/man/cat1/cu.0
+       ln ${DESTDIR}/usr/man/cat1/tip.0 ${DESTDIR}/usr/man/cat1/cu.0
+
+lint: ${SRCS}
+       lint ${CFLAGS} ${SRCS}
 
 
-print:
-       @pr README TODO makefile
-       @size *.o | pr -h SIZES
-       @${CXREF} ${SOURCES} tip.h | pr -h XREF
-       @ls -l | pr 
-       @pr tip.h ${SOURCES}
+tags: ${SRCS}
+       ctags ${SRCS}
+       cd aculib; make ${MFLAGS} tags
 
 
-lint:
-       -lint -hbacvx ${CFLAGS} ${SOURCES}
+FRC: