xref: /illumos-gate/usr/src/cmd/tip/Makefile (revision d3b5f563)
17c478bd9Sstevel@tonic-gate#
224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37c478bd9Sstevel@tonic-gate# Use is subject to license terms.
47c478bd9Sstevel@tonic-gate#
57c478bd9Sstevel@tonic-gate# Makefile for intermachine communications package.
67c478bd9Sstevel@tonic-gate#
77c478bd9Sstevel@tonic-gate# Files are:
87c478bd9Sstevel@tonic-gate#	/etc/remote		remote host description file
924fe0b3bSjmcp#	/etc/phones		phone number file, owned by uucp and
107c478bd9Sstevel@tonic-gate#				  mode 6??
1124fe0b3bSjmcp#	/var/adm/aculog		ACU accounting file, owned by uucp and
127c478bd9Sstevel@tonic-gate#				  mode 6?? (if ACULOG defined)
137c478bd9Sstevel@tonic-gate# Presently supports:
147c478bd9Sstevel@tonic-gate#	BIZCOMP
157c478bd9Sstevel@tonic-gate#	DEC DF02-AC, DF03-AC
167c478bd9Sstevel@tonic-gate#	DEC DN-11/Able Quadracall
177c478bd9Sstevel@tonic-gate#	VENTEL 212+
187c478bd9Sstevel@tonic-gate#	VADIC 831 RS232 adaptor
197c478bd9Sstevel@tonic-gate#	VADIC 3451
207c478bd9Sstevel@tonic-gate#	HAYES SmartModem
217c478bd9Sstevel@tonic-gate# (drivers are located in aculib.a)
227c478bd9Sstevel@tonic-gate#
237c478bd9Sstevel@tonic-gate# Configuration defines:
247c478bd9Sstevel@tonic-gate#	DF02, DF03, DN11	ACU's supported
257c478bd9Sstevel@tonic-gate#	  BIZ1031, BIZ1022, VENTEL, V831, V3451, HAYES
267c478bd9Sstevel@tonic-gate#	ACULOG			turn on tip logging of ACU use
277c478bd9Sstevel@tonic-gate#	PRISTINE		no phone #'s put in ACU log file
287c478bd9Sstevel@tonic-gate#	DEFBR			default baud rate to make connection at
297c478bd9Sstevel@tonic-gate#	DEFFS			default frame size for FTP buffering of
307c478bd9Sstevel@tonic-gate#				writes on local side
317c478bd9Sstevel@tonic-gate#	BUFSIZ			buffer sizing from stdio, must be fed
327c478bd9Sstevel@tonic-gate#				explicitly to remcap.c if not 1024
337c478bd9Sstevel@tonic-gate#
347c478bd9Sstevel@tonic-gate# cmd/tip/Makefile
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gatePROG=	tip
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gateOBJS=	acu.o cmds.o cmdtab.o cu.o hunt.o \
397c478bd9Sstevel@tonic-gate	log.o partab.o remote.o tip.o tipout.o value.o vars.o \
407c478bd9Sstevel@tonic-gate	acutab.o remcap.o uucplock.o
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gate# sigh, NSE can't handle wildcards
437c478bd9Sstevel@tonic-gate#DRIVERS=	aculib/*.c
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gateSRCS=	$(OBJS:.o=.c)
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gateSOURCES=$(SRCS) $(DRIVERS)
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gateinclude	../Makefile.cmd
507c478bd9Sstevel@tonic-gate
517c478bd9Sstevel@tonic-gateREMOTE=		etc.remote
527c478bd9Sstevel@tonic-gateACULOG=		aculog
537c478bd9Sstevel@tonic-gateROOTETCREMOTE=	$(ROOTETC)/remote
547c478bd9Sstevel@tonic-gateROOTACULOGD=	$(ROOT)/var/adm
557c478bd9Sstevel@tonic-gateROOTACULOG=	$(ROOTACULOGD)/aculog
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gate$(ROOTPROG) :=		FILEMODE =	4511
587c478bd9Sstevel@tonic-gate$(ROOTETCREMOTE) :=	FILEMODE =	644
597c478bd9Sstevel@tonic-gate$(ROOTACULOG) :=	FILEMODE =	600
607c478bd9Sstevel@tonic-gate
618d489c7aSmuffinLINTFLAGS +=	-u
627c478bd9Sstevel@tonic-gateCPPFLAGS +=	-DDEFBR=300 -DDEFFS=BUFSIZ -DACULOG -DUSG
637014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
647014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-clobbered
65*d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
667c478bd9Sstevel@tonic-gateCONFIG=	-DV831 -DVENTEL -DV3451 -DDF02 -DDF03 -DBIZ1031 -DBIZ1022 -DHAYES
677c478bd9Sstevel@tonic-gateACULIB=	aculib/aculib.a
687c478bd9Sstevel@tonic-gateLDLIBS=	$(ACULIB) $(LDLIBS.cmd)
697c478bd9Sstevel@tonic-gate
70b6805bf7SGordon RossCLOBBERFILES += $(ACULOG)
71b6805bf7SGordon Ross
727c478bd9Sstevel@tonic-gate# install rules
737c478bd9Sstevel@tonic-gate$(ROOTACULOGD)/% : %
747c478bd9Sstevel@tonic-gate	$(INS.file)
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gate$(ROOTETC)/% : etc.%
777c478bd9Sstevel@tonic-gate	$(INS.rename)
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate.KEEP_STATE:
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJS)
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gateall:	$(PROG) $(REMOTE) $(ACULOG)
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gate$(PROG):	$(OBJS) $(ACULIB)
867c478bd9Sstevel@tonic-gate	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
877c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate# special build rules
907c478bd9Sstevel@tonic-gateremcap.o :=	CPPFLAGS += -DBUFSIZ=1024
917c478bd9Sstevel@tonic-gateacutab.o :=	CPPFLAGS += $(CONFIG)
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate# acutab is configuration dependent, and so depends on the makefile
947c478bd9Sstevel@tonic-gateacutab.o: Makefile
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gate# remote.o depends on the makefile because of DEFBR and DEFFS
977c478bd9Sstevel@tonic-gateremote.o: Makefile
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gate# log.o depends on the makefile because of ACULOG
1007c478bd9Sstevel@tonic-gatelog.o:	Makefile
1017c478bd9Sstevel@tonic-gate
1027c478bd9Sstevel@tonic-gate$(ACULIB): FRC
1037c478bd9Sstevel@tonic-gate	cd aculib; $(MAKE)
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gateinstall: all $(ROOTPROG) $(ROOTETCREMOTE) $(ROOTACULOG)
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gate$(ACULOG):
1087c478bd9Sstevel@tonic-gate	cp /dev/null $(ACULOG)
1097c478bd9Sstevel@tonic-gate
1107c478bd9Sstevel@tonic-gateclean:	FRC
1117c478bd9Sstevel@tonic-gate	cd aculib; $(MAKE) clean
1127c478bd9Sstevel@tonic-gate	$(RM) $(OBJS)
1137c478bd9Sstevel@tonic-gate
1147c478bd9Sstevel@tonic-gatelint:
1158d489c7aSmuffin	cd aculib; $(MAKE) lint
1168d489c7aSmuffin	$(LINT.c) $(SRCS) $(LDLIBS.cmd)
1178d489c7aSmuffin
1187c478bd9Sstevel@tonic-gate
1197c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gateFRC:
122