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