xref: /titanic_52/usr/src/cmd/tip/Makefile (revision 1a7c1b724419d3cb5fa6eea75123c6b2060ba31b)
1#
2# Copyright 1998-2002 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# ident	"%Z%%M%	%I%	%E% SMI"
6#
7# Makefile for intermachine communications package.
8#
9# Files are:
10#	/etc/remote		remote host description file
11#	/etc/phones		phone number file, owned by $(OWNER) and
12#				  mode 6??
13#	/var/adm/aculog		ACU accounting file, owned by $(OWNER) and
14#				  mode 6?? (if ACULOG defined)
15# Presently supports:
16#	BIZCOMP
17#	DEC DF02-AC, DF03-AC
18#	DEC DN-11/Able Quadracall
19#	VENTEL 212+
20#	VADIC 831 RS232 adaptor
21#	VADIC 3451
22#	HAYES SmartModem
23# (drivers are located in aculib.a)
24#
25# Configuration defines:
26#	DF02, DF03, DN11	ACU's supported
27#	  BIZ1031, BIZ1022, VENTEL, V831, V3451, HAYES
28#	ACULOG			turn on tip logging of ACU use
29#	PRISTINE		no phone #'s put in ACU log file
30#	DEFBR			default baud rate to make connection at
31#	DEFFS			default frame size for FTP buffering of
32#				writes on local side
33#	BUFSIZ			buffer sizing from stdio, must be fed
34#				explicitly to remcap.c if not 1024
35#
36# cmd/tip/Makefile
37
38PROG=	tip
39
40OBJS=	acu.o cmds.o cmdtab.o cu.o hunt.o \
41	log.o partab.o remote.o tip.o tipout.o value.o vars.o \
42	acutab.o remcap.o uucplock.o
43
44# sigh, NSE can't handle wildcards
45#DRIVERS=	aculib/*.c
46
47SRCS=	$(OBJS:.o=.c)
48
49SOURCES=$(SRCS) $(DRIVERS)
50
51include	../Makefile.cmd
52
53REMOTE=		etc.remote
54ACULOG=		aculog
55ROOTETCREMOTE=	$(ROOTETC)/remote
56ROOTACULOGD=	$(ROOT)/var/adm
57ROOTACULOG=	$(ROOTACULOGD)/aculog
58
59$(ROOTPROG) :=		FILEMODE =	4511
60$(ROOTPROG) :=		OWNER =		uucp
61$(ROOTETCREMOTE) :=	FILEMODE =	644
62$(ROOTACULOG) :=	FILEMODE =	600
63$(ROOTACULOG) :=	OWNER =		uucp
64
65CPPFLAGS +=	-DDEFBR=300 -DDEFFS=BUFSIZ -DACULOG -DUSG
66CONFIG=	-DV831 -DVENTEL -DV3451 -DDF02 -DDF03 -DBIZ1031 -DBIZ1022 -DHAYES
67ACULIB=	aculib/aculib.a
68LDLIBS=	$(ACULIB) $(LDLIBS.cmd)
69
70# install rules
71$(ROOTACULOGD)/% : %
72	$(INS.file)
73
74$(ROOTETC)/% : etc.%
75	$(INS.rename)
76
77.KEEP_STATE:
78
79.PARALLEL: $(OBJS)
80
81all:	$(PROG) $(REMOTE) $(ACULOG)
82
83$(PROG):	$(OBJS) $(ACULIB)
84	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
85	$(POST_PROCESS)
86
87# special build rules
88remcap.o :=	CPPFLAGS += -DBUFSIZ=1024
89acutab.o :=	CPPFLAGS += $(CONFIG)
90
91# acutab is configuration dependent, and so depends on the makefile
92acutab.o: Makefile
93
94# remote.o depends on the makefile because of DEFBR and DEFFS
95remote.o: Makefile
96
97# log.o depends on the makefile because of ACULOG
98log.o:	Makefile
99
100$(ACULIB): FRC
101	cd aculib; $(MAKE)
102
103install: all $(ROOTPROG) $(ROOTETCREMOTE) $(ROOTACULOG)
104
105$(ACULOG):
106	cp /dev/null $(ACULOG)
107
108clean:	FRC
109	cd aculib; $(MAKE) clean
110	$(RM) $(OBJS)
111
112lint:
113	-lint -hbacvx $(CFLAGS) $(SOURCES)
114
115include ../Makefile.targ
116
117FRC:
118