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