xref: /titanic_51/usr/src/cmd/tip/Makefile (revision df14233e629298598736976c5bfcf4a31873745f)
1#
2# Copyright 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
65LINTFLAGS +=	-u
66CPPFLAGS +=	-DDEFBR=300 -DDEFFS=BUFSIZ -DACULOG -DUSG
67CONFIG=	-DV831 -DVENTEL -DV3451 -DDF02 -DDF03 -DBIZ1031 -DBIZ1022 -DHAYES
68ACULIB=	aculib/aculib.a
69LDLIBS=	$(ACULIB) $(LDLIBS.cmd)
70
71# install rules
72$(ROOTACULOGD)/% : %
73	$(INS.file)
74
75$(ROOTETC)/% : etc.%
76	$(INS.rename)
77
78.KEEP_STATE:
79
80.PARALLEL: $(OBJS)
81
82all:	$(PROG) $(REMOTE) $(ACULOG)
83
84$(PROG):	$(OBJS) $(ACULIB)
85	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
86	$(POST_PROCESS)
87
88# special build rules
89remcap.o :=	CPPFLAGS += -DBUFSIZ=1024
90acutab.o :=	CPPFLAGS += $(CONFIG)
91
92# acutab is configuration dependent, and so depends on the makefile
93acutab.o: Makefile
94
95# remote.o depends on the makefile because of DEFBR and DEFFS
96remote.o: Makefile
97
98# log.o depends on the makefile because of ACULOG
99log.o:	Makefile
100
101$(ACULIB): FRC
102	cd aculib; $(MAKE)
103
104install: all $(ROOTPROG) $(ROOTETCREMOTE) $(ROOTACULOG)
105
106$(ACULOG):
107	cp /dev/null $(ACULOG)
108
109clean:	FRC
110	cd aculib; $(MAKE) clean
111	$(RM) $(OBJS)
112
113lint:
114	cd aculib; $(MAKE) lint
115	$(LINT.c) $(SRCS) $(LDLIBS.cmd)
116
117
118include ../Makefile.targ
119
120FRC:
121