xref: /illumos-gate/usr/src/cmd/bnu/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa0324)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate#
23*7c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
24*7c478bd9Sstevel@tonic-gate#
25*7c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
27*7c478bd9Sstevel@tonic-gate#
28*7c478bd9Sstevel@tonic-gate# cmd/bnu/Makefile
29*7c478bd9Sstevel@tonic-gate#
30*7c478bd9Sstevel@tonic-gate
31*7c478bd9Sstevel@tonic-gateinclude		../Makefile.cmd
32*7c478bd9Sstevel@tonic-gate
33*7c478bd9Sstevel@tonic-gateUSERPROG1 =	uudecode uuencode
34*7c478bd9Sstevel@tonic-gateUSERPROG =	$(USERPROG1) uucp uuglist uuname uustat uux ct cu
35*7c478bd9Sstevel@tonic-gateUUCPPROG1 =	bnuconvert uucheck uucleanup
36*7c478bd9Sstevel@tonic-gateUUCPPROG =	$(UUCPPROG1) remote.unknown uusched uucico uuxqt
37*7c478bd9Sstevel@tonic-gateSBINPROG =	in.uucpd
38*7c478bd9Sstevel@tonic-gate
39*7c478bd9Sstevel@tonic-gatePROG =		$(UUCPPROG) $(USERPROG) $(SBINPROG)
40*7c478bd9Sstevel@tonic-gate
41*7c478bd9Sstevel@tonic-gateMANIFEST =	uucp.xml
42*7c478bd9Sstevel@tonic-gate
43*7c478bd9Sstevel@tonic-gateLIBSHELLS =	Uutry uudemon.admin uudemon.cleanup uudemon.hour uudemon.poll
44*7c478bd9Sstevel@tonic-gateBINSHELLS =	uulog uupick uuto
45*7c478bd9Sstevel@tonic-gateSHELLS =	$(LIBSHELLS) $(BINSHELLS)
46*7c478bd9Sstevel@tonic-gateCRONTAB =	uudemon.crontab
47*7c478bd9Sstevel@tonic-gate
48*7c478bd9Sstevel@tonic-gate#include	../../lib/Makefile.lib
49*7c478bd9Sstevel@tonic-gate
50*7c478bd9Sstevel@tonic-gateFILES =		Config Devconfig Devices Dialcodes	\
51*7c478bd9Sstevel@tonic-gate		Dialers Grades Limits Permissions	\
52*7c478bd9Sstevel@tonic-gate		Poll Sysfiles Systems
53*7c478bd9Sstevel@tonic-gate
54*7c478bd9Sstevel@tonic-gateCLEANFILES =	$(SRCS:%.c=%.o) common.o
55*7c478bd9Sstevel@tonic-gate
56*7c478bd9Sstevel@tonic-gateTXTFILES =	README $(FILES)	\
57*7c478bd9Sstevel@tonic-gate		dkbreak.c dkdial.c dkerr.c dkminor.c dtnamer.c	\
58*7c478bd9Sstevel@tonic-gate		Cvt Install SetUp Teardown dial.c dial.h getopt.c strpbrk.c
59*7c478bd9Sstevel@tonic-gate
60*7c478bd9Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCNETWORK)
61*7c478bd9Sstevel@tonic-gate$(ROOTMANIFEST)		:= FILEMODE= 444
62*7c478bd9Sstevel@tonic-gate
63*7c478bd9Sstevel@tonic-gateCAT =		cat
64*7c478bd9Sstevel@tonic-gatePOFILE =	bnu.po
65*7c478bd9Sstevel@tonic-gate# step around name collisions
66*7c478bd9Sstevel@tonic-gatePOFILES =	$(PROG:%=%.cat)
67*7c478bd9Sstevel@tonic-gate
68*7c478bd9Sstevel@tonic-gateCPPFLAGS =	-I. $(SMALLFLAG) $(CPPFLAGS.master) # -DSMALL
69*7c478bd9Sstevel@tonic-gate
70*7c478bd9Sstevel@tonic-gateOWNER =		uucp
71*7c478bd9Sstevel@tonic-gateGROUP =		uucp
72*7c478bd9Sstevel@tonic-gateFILEMODE =	4511
73*7c478bd9Sstevel@tonic-gate
74*7c478bd9Sstevel@tonic-gate# if you change these directories, change them in uucp.h as well
75*7c478bd9Sstevel@tonic-gate
76*7c478bd9Sstevel@tonic-gateROOTLIBUUCP =	$(ROOT)/usr/lib/uucp
77*7c478bd9Sstevel@tonic-gateROOTETCUUCP =	$(ROOT)/etc/uucp
78*7c478bd9Sstevel@tonic-gateROOTVAR =	$(ROOT)/var
79*7c478bd9Sstevel@tonic-gateROOTVARUUCP =	$(ROOTVAR)/uucp
80*7c478bd9Sstevel@tonic-gateROOTSPOOL =	$(ROOTVAR)/spool
81*7c478bd9Sstevel@tonic-gateROOTSPLOCKS =	$(ROOTSPOOL)/locks
82*7c478bd9Sstevel@tonic-gateROOTSPUUCP =	$(ROOTSPOOL)/uucp
83*7c478bd9Sstevel@tonic-gateROOTSPPUB =	$(ROOTSPOOL)/uucppublic
84*7c478bd9Sstevel@tonic-gate
85*7c478bd9Sstevel@tonic-gateDOTADMIN =	.Admin
86*7c478bd9Sstevel@tonic-gateDOTCORRUPT =	.Corrupt
87*7c478bd9Sstevel@tonic-gateDOTLOG =	.Log
88*7c478bd9Sstevel@tonic-gateDOTOLD =	.Old
89*7c478bd9Sstevel@tonic-gateDOTSEQ =	.Sequence
90*7c478bd9Sstevel@tonic-gateDOTSTATUS =	.Status
91*7c478bd9Sstevel@tonic-gateDOTWORKSPACE =	.Workspace
92*7c478bd9Sstevel@tonic-gateDOTXQT =	.Xqtdir
93*7c478bd9Sstevel@tonic-gateDOTDIRS =	$(DOTADMIN) $(DOTLOG) $(DOTOLD) $(DOTSEQ) $(DOTSTATUS)
94*7c478bd9Sstevel@tonic-gateDOTSPDIRS =	$(DOTCORRUPT) $(DOTWORKSPACE) $(DOTXQT)
95*7c478bd9Sstevel@tonic-gate
96*7c478bd9Sstevel@tonic-gateDOTLOGCICO =	$(DOTLOG)/uucico
97*7c478bd9Sstevel@tonic-gateDOTLOGUUCP =	$(DOTLOG)/uucp
98*7c478bd9Sstevel@tonic-gateDOTLOGUUX =	$(DOTLOG)/uux
99*7c478bd9Sstevel@tonic-gateDOTLOGUUXQT =	$(DOTLOG)/uuxqt
100*7c478bd9Sstevel@tonic-gateDOTLOGDIRS =	$(DOTLOGCICO) $(DOTLOGUUCP) $(DOTLOGUUX) $(DOTLOGUUXQT)
101*7c478bd9Sstevel@tonic-gate
102*7c478bd9Sstevel@tonic-gateROOTDOTDIRS =	$(DOTDIRS:%=$(ROOTVARUUCP)/%)
103*7c478bd9Sstevel@tonic-gateROOTDOTSPDIRS =	$(DOTSPDIRS:%=$(ROOTSPUUCP)/%)
104*7c478bd9Sstevel@tonic-gateROOTDOTLOGDIRS = $(DOTLOGDIRS:%=$(ROOTVARUUCP)/%)
105*7c478bd9Sstevel@tonic-gate
106*7c478bd9Sstevel@tonic-gateROOTPROG =	$(USERPROG:%=$(ROOTBIN)/%)
107*7c478bd9Sstevel@tonic-gateROOTSPROG =	$(SBINPROG:%=$(ROOTUSRSBIN)/%)
108*7c478bd9Sstevel@tonic-gateROOTSHELLS =	$(BINSHELLS:%=$(ROOTBIN)/%)
109*7c478bd9Sstevel@tonic-gateROOTUUCPPROG =	$(UUCPPROG:%=$(ROOTLIBUUCP)/%)
110*7c478bd9Sstevel@tonic-gateROOTLIBSHELLS =	$(LIBSHELLS:%=$(ROOTLIBUUCP)/%)
111*7c478bd9Sstevel@tonic-gateROOTCRONTAB =	$(CRONTAB:%=$(ROOTLIBUUCP)/%)
112*7c478bd9Sstevel@tonic-gateROOTFILES =	$(FILES:%=$(ROOTETCUUCP)/%)
113*7c478bd9Sstevel@tonic-gate
114*7c478bd9Sstevel@tonic-gateROOTDIRS =	$(ROOTLIBUUCP) $(ROOTETCUUCP) $(ROOTSPLOCKS)	\
115*7c478bd9Sstevel@tonic-gate		$(ROOTDOTDIRS) $(ROOTDOTSPDIRS) $(ROOTDOTLOGDIRS)
116*7c478bd9Sstevel@tonic-gate
117*7c478bd9Sstevel@tonic-gateROOTSYMDIRS =	$(DOTDIRS:%=$(ROOTSPUUCP)/%)
118*7c478bd9Sstevel@tonic-gateSYMDEST =	../../uucp
119*7c478bd9Sstevel@tonic-gateROOTREMOTE =	$(ROOTETCUUCP)/remote.unknown
120*7c478bd9Sstevel@tonic-gateREMOTESYMDEST =	../../usr/lib/uucp
121*7c478bd9Sstevel@tonic-gate
122*7c478bd9Sstevel@tonic-gate$(USERPROG1) := CPPFLAGS += -D_FILE_OFFSET_BITS=64
123*7c478bd9Sstevel@tonic-gate
124*7c478bd9Sstevel@tonic-gate# Mode is assigned in Targetdirs.  It shoudn't be re-assigned here
125*7c478bd9Sstevel@tonic-gate#$(ROOTSPPUB) :=				DIRMODE = 1777
126*7c478bd9Sstevel@tonic-gate$(USERPROG1:%=$(ROOTBIN)/%) :=		FILEMODE = 0555
127*7c478bd9Sstevel@tonic-gate$(USERPROG1:%=$(ROOTBIN)/%) :=		OWNER = root
128*7c478bd9Sstevel@tonic-gate$(ROOTSHELLS) :=			FILEMODE = 0555
129*7c478bd9Sstevel@tonic-gate$(ROOTSHELLS) :=			OWNER = root
130*7c478bd9Sstevel@tonic-gate$(ROOTLIBSHELLS) :=			FILEMODE = 0555
131*7c478bd9Sstevel@tonic-gate$(ROOTLIBSHELLS) :=			OWNER = root
132*7c478bd9Sstevel@tonic-gate$(UUCPPROG1:%=$(ROOTLIBUUCP)/%) :=	FILEMODE = 0510
133*7c478bd9Sstevel@tonic-gate$(ROOTCRONTAB) :=			FILEMODE = 0444
134*7c478bd9Sstevel@tonic-gate$(ROOTCRONTAB) :=			OWNER = root
135*7c478bd9Sstevel@tonic-gate$(ROOTFILES) :=				FILEMODE = 0644
136*7c478bd9Sstevel@tonic-gate$(ROOTETCUUCP)/Permissions :=		FILEMODE = 0600
137*7c478bd9Sstevel@tonic-gate$(ROOTETCUUCP)/Systems :=		FILEMODE = 0600
138*7c478bd9Sstevel@tonic-gate$(ROOTBIN)/ct :=			OWNER = root
139*7c478bd9Sstevel@tonic-gate$(ROOTSPROG) :=				FILEMODE = 0555
140*7c478bd9Sstevel@tonic-gate$(ROOTSPROG) :=				OWNER = root
141*7c478bd9Sstevel@tonic-gate
142*7c478bd9Sstevel@tonic-gateinclude		./Makefile.inc
143*7c478bd9Sstevel@tonic-gate
144*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
145*7c478bd9Sstevel@tonic-gate
146*7c478bd9Sstevel@tonic-gateall:		$(TXTFILES) $(PROG) $(SHELLS)
147*7c478bd9Sstevel@tonic-gate
148*7c478bd9Sstevel@tonic-gateinstall:	$(ROOTDIRS) $(ROOTSYMDIRS) $(ROOTPROG)		\
149*7c478bd9Sstevel@tonic-gate		$(ROOTUUCPPROG) $(ROOTLIBSHELLS) $(ROOTSHELLS)	\
150*7c478bd9Sstevel@tonic-gate		$(ROOTFILES) $(ROOTSYMFILES) $(ROOTSPROG)	\
151*7c478bd9Sstevel@tonic-gate		$(ROOTREMOTE) $(ROOTCRONTAB) $(ROOTMANIFEST)
152*7c478bd9Sstevel@tonic-gate
153*7c478bd9Sstevel@tonic-gate$(ROOTLIBUUCP)/% $(ROOTETCUUCP)/% $(ROOTUSRSBIN)/%: %
154*7c478bd9Sstevel@tonic-gate		$(INS.file)
155*7c478bd9Sstevel@tonic-gate
156*7c478bd9Sstevel@tonic-gate$(PROG):	$$(POBJS)
157*7c478bd9Sstevel@tonic-gate		$(LINK.c) $(POBJS) -o $@ $(LDLIBS) $(PLIBS)
158*7c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
159*7c478bd9Sstevel@tonic-gate
160*7c478bd9Sstevel@tonic-gate$(POFILE):	$(POFILES)
161*7c478bd9Sstevel@tonic-gate		$(RM) $@; $(CAT) $(POFILES) > $@
162*7c478bd9Sstevel@tonic-gate
163*7c478bd9Sstevel@tonic-gate$(POFILES):	$$(POBJS:.o=.po)
164*7c478bd9Sstevel@tonic-gate		$(RM) $@; $(CAT) $(POBJS:.o=.po) > $@
165*7c478bd9Sstevel@tonic-gate
166*7c478bd9Sstevel@tonic-gate$(ROOTDIRS):
167*7c478bd9Sstevel@tonic-gate		$(INS.dir)
168*7c478bd9Sstevel@tonic-gate
169*7c478bd9Sstevel@tonic-gate$(ROOTSYMDIRS):
170*7c478bd9Sstevel@tonic-gate		$(RM) $@; $(SYMLINK) $(SYMDEST)/$(@F) $@
171*7c478bd9Sstevel@tonic-gate
172*7c478bd9Sstevel@tonic-gate$(ROOTREMOTE):
173*7c478bd9Sstevel@tonic-gate		$(RM) $@; $(SYMLINK) $(REMOTESYMDEST)/$(@F) $@
174*7c478bd9Sstevel@tonic-gate
175*7c478bd9Sstevel@tonic-gatecheck:		$(CHKMANIFEST)
176*7c478bd9Sstevel@tonic-gate
177*7c478bd9Sstevel@tonic-gateclean:
178*7c478bd9Sstevel@tonic-gate		$(RM) $(CLEANFILES)
179*7c478bd9Sstevel@tonic-gate
180*7c478bd9Sstevel@tonic-gatelint:		lint_SRCS
181*7c478bd9Sstevel@tonic-gate
182*7c478bd9Sstevel@tonic-gatestrip:
183*7c478bd9Sstevel@tonic-gate		$(STRIP) $(PROG)
184*7c478bd9Sstevel@tonic-gate
185*7c478bd9Sstevel@tonic-gate# special rules for 'common', since it lives in chmod's directory
186*7c478bd9Sstevel@tonic-gate
187*7c478bd9Sstevel@tonic-gatecommon.o:	../chmod/common.c
188*7c478bd9Sstevel@tonic-gate		$(COMPILE.c) -o $@ ../chmod/common.c
189*7c478bd9Sstevel@tonic-gate
190*7c478bd9Sstevel@tonic-gatecommon.po:	../chmod/common.c
191*7c478bd9Sstevel@tonic-gate		$(COMPILE.cpp) ../chmod/common.c > common.c.i
192*7c478bd9Sstevel@tonic-gate		$(XGETTEXT) $(XGETFLAGS) common.c.i ;\
193*7c478bd9Sstevel@tonic-gate		$(RM)   $@ ;\
194*7c478bd9Sstevel@tonic-gate		sed "/^domain/d" < messages.po  > $@ ;\
195*7c478bd9Sstevel@tonic-gate		$(RM) messages.po common.c.i
196*7c478bd9Sstevel@tonic-gate
197*7c478bd9Sstevel@tonic-gateinclude		../Makefile.targ
198