17c478bdstevel@tonic-gate#
27c478bdstevel@tonic-gate# CDDL HEADER START
37c478bdstevel@tonic-gate#
47c478bdstevel@tonic-gate# The contents of this file are subject to the terms of the
5a192e90amaguire# Common Development and Distribution License (the "License").
6a192e90amaguire# You may not use this file except in compliance with the License.
77c478bdstevel@tonic-gate#
87c478bdstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bdstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bdstevel@tonic-gate# See the License for the specific language governing permissions
117c478bdstevel@tonic-gate# and limitations under the License.
127c478bdstevel@tonic-gate#
137c478bdstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bdstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bdstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bdstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bdstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bdstevel@tonic-gate#
197c478bdstevel@tonic-gate# CDDL HEADER END
207c478bdstevel@tonic-gate#
2124fe0b3jmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
227c478bdstevel@tonic-gate# Use is subject to license terms.
237c478bdstevel@tonic-gate#
247c478bdstevel@tonic-gate# cmd/bnu/Makefile
257c478bdstevel@tonic-gate#
267c478bdstevel@tonic-gate
27a192e90amaguireMANIFEST =	uucp.xml
28a192e90amaguire
297c478bdstevel@tonic-gateinclude		../Makefile.cmd
307c478bdstevel@tonic-gate
317c478bdstevel@tonic-gateUSERPROG1 =	uudecode uuencode
327c478bdstevel@tonic-gateUSERPROG =	$(USERPROG1) uucp uuglist uuname uustat uux ct cu
337c478bdstevel@tonic-gateUUCPPROG1 =	bnuconvert uucheck uucleanup
347c478bdstevel@tonic-gateUUCPPROG =	$(UUCPPROG1) remote.unknown uusched uucico uuxqt
357c478bdstevel@tonic-gateSBINPROG =	in.uucpd
367c478bdstevel@tonic-gate
377c478bdstevel@tonic-gatePROG =		$(UUCPPROG) $(USERPROG) $(SBINPROG)
387c478bdstevel@tonic-gate
397c478bdstevel@tonic-gateLIBSHELLS =	Uutry uudemon.admin uudemon.cleanup uudemon.hour uudemon.poll
407c478bdstevel@tonic-gateBINSHELLS =	uulog uupick uuto
417c478bdstevel@tonic-gateSHELLS =	$(LIBSHELLS) $(BINSHELLS)
427c478bdstevel@tonic-gateCRONTAB =	uudemon.crontab
437c478bdstevel@tonic-gate
447c478bdstevel@tonic-gate#include	../../lib/Makefile.lib
457c478bdstevel@tonic-gate
467c478bdstevel@tonic-gateFILES =		Config Devconfig Devices Dialcodes	\
477c478bdstevel@tonic-gate		Dialers Grades Limits Permissions	\
487c478bdstevel@tonic-gate		Poll Sysfiles Systems
497c478bdstevel@tonic-gate
507c478bdstevel@tonic-gateCLEANFILES =	$(SRCS:%.c=%.o) common.o
517c478bdstevel@tonic-gate
52b6805bfGordon Ross# This Makefile overrides the standard POFILES (*.cat)
53b6805bfGordon Ross# so we have to augment clobber this ugly way.
54b6805bfGordon RossCLOBBERFILES +=	$(SRCS:%.c=%.po) common.po
55b6805bfGordon Ross
567c478bdstevel@tonic-gateTXTFILES =	README $(FILES)	\
577c478bdstevel@tonic-gate		dkbreak.c dkdial.c dkerr.c dkminor.c dtnamer.c	\
587c478bdstevel@tonic-gate		Cvt Install SetUp Teardown dial.c dial.h getopt.c strpbrk.c
597c478bdstevel@tonic-gate
607c478bdstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCNETWORK)
617c478bdstevel@tonic-gate
627c478bdstevel@tonic-gateCAT =		cat
637c478bdstevel@tonic-gatePOFILE =	bnu.po
647c478bdstevel@tonic-gate# step around name collisions
657c478bdstevel@tonic-gatePOFILES =	$(PROG:%=%.cat)
667c478bdstevel@tonic-gate
677c478bdstevel@tonic-gateCPPFLAGS =	-I. $(SMALLFLAG) $(CPPFLAGS.master) # -DSMALL
687c478bdstevel@tonic-gate
697c478bdstevel@tonic-gateFILEMODE =	4511
707c478bdstevel@tonic-gate
717c478bdstevel@tonic-gate# if you change these directories, change them in uucp.h as well
727c478bdstevel@tonic-gate
737c478bdstevel@tonic-gateROOTLIBUUCP =	$(ROOT)/usr/lib/uucp
747c478bdstevel@tonic-gateROOTETCUUCP =	$(ROOT)/etc/uucp
757c478bdstevel@tonic-gateROOTVAR =	$(ROOT)/var
767c478bdstevel@tonic-gateROOTVARUUCP =	$(ROOTVAR)/uucp
777c478bdstevel@tonic-gateROOTSPOOL =	$(ROOTVAR)/spool
787c478bdstevel@tonic-gateROOTSPLOCKS =	$(ROOTSPOOL)/locks
797c478bdstevel@tonic-gateROOTSPUUCP =	$(ROOTSPOOL)/uucp
807c478bdstevel@tonic-gateROOTSPPUB =	$(ROOTSPOOL)/uucppublic
817c478bdstevel@tonic-gate
827c478bdstevel@tonic-gateDOTADMIN =	.Admin
837c478bdstevel@tonic-gateDOTCORRUPT =	.Corrupt
847c478bdstevel@tonic-gateDOTLOG =	.Log
857c478bdstevel@tonic-gateDOTOLD =	.Old
867c478bdstevel@tonic-gateDOTSEQ =	.Sequence
877c478bdstevel@tonic-gateDOTSTATUS =	.Status
887c478bdstevel@tonic-gateDOTWORKSPACE =	.Workspace
897c478bdstevel@tonic-gateDOTXQT =	.Xqtdir
907c478bdstevel@tonic-gateDOTDIRS =	$(DOTADMIN) $(DOTLOG) $(DOTOLD) $(DOTSEQ) $(DOTSTATUS)
917c478bdstevel@tonic-gateDOTSPDIRS =	$(DOTCORRUPT) $(DOTWORKSPACE) $(DOTXQT)
927c478bdstevel@tonic-gate
937c478bdstevel@tonic-gateDOTLOGCICO =	$(DOTLOG)/uucico
947c478bdstevel@tonic-gateDOTLOGUUCP =	$(DOTLOG)/uucp
957c478bdstevel@tonic-gateDOTLOGUUX =	$(DOTLOG)/uux
967c478bdstevel@tonic-gateDOTLOGUUXQT =	$(DOTLOG)/uuxqt
977c478bdstevel@tonic-gateDOTLOGDIRS =	$(DOTLOGCICO) $(DOTLOGUUCP) $(DOTLOGUUX) $(DOTLOGUUXQT)
987c478bdstevel@tonic-gate
997c478bdstevel@tonic-gateROOTDOTDIRS =	$(DOTDIRS:%=$(ROOTVARUUCP)/%)
1007c478bdstevel@tonic-gateROOTDOTSPDIRS =	$(DOTSPDIRS:%=$(ROOTSPUUCP)/%)
1017c478bdstevel@tonic-gateROOTDOTLOGDIRS = $(DOTLOGDIRS:%=$(ROOTVARUUCP)/%)
1027c478bdstevel@tonic-gate
1037c478bdstevel@tonic-gateROOTPROG =	$(USERPROG:%=$(ROOTBIN)/%)
1047c478bdstevel@tonic-gateROOTSPROG =	$(SBINPROG:%=$(ROOTUSRSBIN)/%)
1057c478bdstevel@tonic-gateROOTSHELLS =	$(BINSHELLS:%=$(ROOTBIN)/%)
1067c478bdstevel@tonic-gateROOTUUCPPROG =	$(UUCPPROG:%=$(ROOTLIBUUCP)/%)
1077c478bdstevel@tonic-gateROOTLIBSHELLS =	$(LIBSHELLS:%=$(ROOTLIBUUCP)/%)
1087c478bdstevel@tonic-gateROOTCRONTAB =	$(CRONTAB:%=$(ROOTLIBUUCP)/%)
1097c478bdstevel@tonic-gateROOTFILES =	$(FILES:%=$(ROOTETCUUCP)/%)
1107c478bdstevel@tonic-gate
1117c478bdstevel@tonic-gateROOTDIRS =	$(ROOTLIBUUCP) $(ROOTETCUUCP) $(ROOTSPLOCKS)	\
1127c478bdstevel@tonic-gate		$(ROOTDOTDIRS) $(ROOTDOTSPDIRS) $(ROOTDOTLOGDIRS)
1137c478bdstevel@tonic-gate
1147c478bdstevel@tonic-gateROOTSYMDIRS =	$(DOTDIRS:%=$(ROOTSPUUCP)/%)
1157c478bdstevel@tonic-gateSYMDEST =	../../uucp
1167c478bdstevel@tonic-gateROOTREMOTE =	$(ROOTETCUUCP)/remote.unknown
1177c478bdstevel@tonic-gateREMOTESYMDEST =	../../usr/lib/uucp
1187c478bdstevel@tonic-gate
1197c478bdstevel@tonic-gate$(USERPROG1) := CPPFLAGS += -D_FILE_OFFSET_BITS=64
1207c478bdstevel@tonic-gate
1217c478bdstevel@tonic-gate# Mode is assigned in Targetdirs.  It shoudn't be re-assigned here
1227c478bdstevel@tonic-gate$(USERPROG1:%=$(ROOTBIN)/%) :=		FILEMODE = 0555
1237c478bdstevel@tonic-gate$(ROOTSHELLS) :=			FILEMODE = 0555
1247c478bdstevel@tonic-gate$(ROOTLIBSHELLS) :=			FILEMODE = 0555
1257c478bdstevel@tonic-gate$(UUCPPROG1:%=$(ROOTLIBUUCP)/%) :=	FILEMODE = 0510
1267c478bdstevel@tonic-gate$(ROOTCRONTAB) :=			FILEMODE = 0444
1277c478bdstevel@tonic-gate$(ROOTFILES) :=				FILEMODE = 0644
1287c478bdstevel@tonic-gate$(ROOTETCUUCP)/Permissions :=		FILEMODE = 0600
1297c478bdstevel@tonic-gate$(ROOTETCUUCP)/Systems :=		FILEMODE = 0600
1307c478bdstevel@tonic-gate$(ROOTSPROG) :=				FILEMODE = 0555
1317c478bdstevel@tonic-gate
1327c478bdstevel@tonic-gateinclude		./Makefile.inc
1337c478bdstevel@tonic-gate
1347c478bdstevel@tonic-gate.KEEP_STATE:
1357c478bdstevel@tonic-gate
1367c478bdstevel@tonic-gateall:		$(TXTFILES) $(PROG) $(SHELLS)
1377c478bdstevel@tonic-gate
1387c478bdstevel@tonic-gateinstall:	$(ROOTDIRS) $(ROOTSYMDIRS) $(ROOTPROG)		\
1397c478bdstevel@tonic-gate		$(ROOTUUCPPROG) $(ROOTLIBSHELLS) $(ROOTSHELLS)	\
1407c478bdstevel@tonic-gate		$(ROOTFILES) $(ROOTSYMFILES) $(ROOTSPROG)	\
1417c478bdstevel@tonic-gate		$(ROOTREMOTE) $(ROOTCRONTAB) $(ROOTMANIFEST)
1427c478bdstevel@tonic-gate
1437c478bdstevel@tonic-gate$(ROOTLIBUUCP)/% $(ROOTETCUUCP)/% $(ROOTUSRSBIN)/%: %
1447c478bdstevel@tonic-gate		$(INS.file)
1457c478bdstevel@tonic-gate
1467c478bdstevel@tonic-gate$(PROG):	$$(POBJS)
1477c478bdstevel@tonic-gate		$(LINK.c) $(POBJS) -o $@ $(LDLIBS) $(PLIBS)
1487c478bdstevel@tonic-gate		$(POST_PROCESS)
1497c478bdstevel@tonic-gate
1507c478bdstevel@tonic-gate$(POFILE):	$(POFILES)
1517c478bdstevel@tonic-gate		$(RM) $@; $(CAT) $(POFILES) > $@
1527c478bdstevel@tonic-gate
1537c478bdstevel@tonic-gate$(POFILES):	$$(POBJS:.o=.po)
1547c478bdstevel@tonic-gate		$(RM) $@; $(CAT) $(POBJS:.o=.po) > $@
1557c478bdstevel@tonic-gate
1567c478bdstevel@tonic-gate$(ROOTDIRS):
1577c478bdstevel@tonic-gate		$(INS.dir)
1587c478bdstevel@tonic-gate
1597c478bdstevel@tonic-gate$(ROOTSYMDIRS):
1607c478bdstevel@tonic-gate		$(RM) $@; $(SYMLINK) $(SYMDEST)/$(@F) $@
1617c478bdstevel@tonic-gate
1627c478bdstevel@tonic-gate$(ROOTREMOTE):
1637c478bdstevel@tonic-gate		$(RM) $@; $(SYMLINK) $(REMOTESYMDEST)/$(@F) $@
1647c478bdstevel@tonic-gate
1657c478bdstevel@tonic-gatecheck:		$(CHKMANIFEST)
1667c478bdstevel@tonic-gate
1677c478bdstevel@tonic-gateclean:
1687c478bdstevel@tonic-gate		$(RM) $(CLEANFILES)
1697c478bdstevel@tonic-gate
1707c478bdstevel@tonic-gatelint:		lint_SRCS
1717c478bdstevel@tonic-gate
1727c478bdstevel@tonic-gatestrip:
1737c478bdstevel@tonic-gate		$(STRIP) $(PROG)
1747c478bdstevel@tonic-gate
1757c478bdstevel@tonic-gate# special rules for 'common', since it lives in chmod's directory
1767c478bdstevel@tonic-gate
1777c478bdstevel@tonic-gatecommon.o:	../chmod/common.c
1787c478bdstevel@tonic-gate		$(COMPILE.c) -o $@ ../chmod/common.c
1797c478bdstevel@tonic-gate
1807c478bdstevel@tonic-gatecommon.po:	../chmod/common.c
1817c478bdstevel@tonic-gate		$(COMPILE.cpp) ../chmod/common.c > common.c.i
1827c478bdstevel@tonic-gate		$(XGETTEXT) $(XGETFLAGS) common.c.i ;\
1837c478bdstevel@tonic-gate		$(RM)   $@ ;\
1847c478bdstevel@tonic-gate		sed "/^domain/d" < messages.po  > $@ ;\
1857c478bdstevel@tonic-gate		$(RM) messages.po common.c.i
1867c478bdstevel@tonic-gate
1877c478bdstevel@tonic-gateinclude		../Makefile.targ
188