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