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