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 30MANIFEST = uucp.xml 31 32include ../Makefile.cmd 33 34USERPROG1 = uudecode uuencode 35USERPROG = $(USERPROG1) uucp uuglist uuname uustat uux ct cu 36UUCPPROG1 = bnuconvert uucheck uucleanup 37UUCPPROG = $(UUCPPROG1) remote.unknown uusched uucico uuxqt 38SBINPROG = in.uucpd 39 40PROG = $(UUCPPROG) $(USERPROG) $(SBINPROG) 41 42LIBSHELLS = Uutry uudemon.admin uudemon.cleanup uudemon.hour uudemon.poll 43BINSHELLS = uulog uupick uuto 44SHELLS = $(LIBSHELLS) $(BINSHELLS) 45CRONTAB = uudemon.crontab 46 47#include ../../lib/Makefile.lib 48 49FILES = Config Devconfig Devices Dialcodes \ 50 Dialers Grades Limits Permissions \ 51 Poll Sysfiles Systems 52 53CLEANFILES = $(SRCS:%.c=%.o) common.o 54 55TXTFILES = 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 59ROOTMANIFESTDIR= $(ROOTSVCNETWORK) 60 61CAT = cat 62POFILE = bnu.po 63# step around name collisions 64POFILES = $(PROG:%=%.cat) 65 66CPPFLAGS = -I. $(SMALLFLAG) $(CPPFLAGS.master) # -DSMALL 67 68OWNER = uucp 69GROUP = uucp 70FILEMODE = 4511 71 72# if you change these directories, change them in uucp.h as well 73 74ROOTLIBUUCP = $(ROOT)/usr/lib/uucp 75ROOTETCUUCP = $(ROOT)/etc/uucp 76ROOTVAR = $(ROOT)/var 77ROOTVARUUCP = $(ROOTVAR)/uucp 78ROOTSPOOL = $(ROOTVAR)/spool 79ROOTSPLOCKS = $(ROOTSPOOL)/locks 80ROOTSPUUCP = $(ROOTSPOOL)/uucp 81ROOTSPPUB = $(ROOTSPOOL)/uucppublic 82 83DOTADMIN = .Admin 84DOTCORRUPT = .Corrupt 85DOTLOG = .Log 86DOTOLD = .Old 87DOTSEQ = .Sequence 88DOTSTATUS = .Status 89DOTWORKSPACE = .Workspace 90DOTXQT = .Xqtdir 91DOTDIRS = $(DOTADMIN) $(DOTLOG) $(DOTOLD) $(DOTSEQ) $(DOTSTATUS) 92DOTSPDIRS = $(DOTCORRUPT) $(DOTWORKSPACE) $(DOTXQT) 93 94DOTLOGCICO = $(DOTLOG)/uucico 95DOTLOGUUCP = $(DOTLOG)/uucp 96DOTLOGUUX = $(DOTLOG)/uux 97DOTLOGUUXQT = $(DOTLOG)/uuxqt 98DOTLOGDIRS = $(DOTLOGCICO) $(DOTLOGUUCP) $(DOTLOGUUX) $(DOTLOGUUXQT) 99 100ROOTDOTDIRS = $(DOTDIRS:%=$(ROOTVARUUCP)/%) 101ROOTDOTSPDIRS = $(DOTSPDIRS:%=$(ROOTSPUUCP)/%) 102ROOTDOTLOGDIRS = $(DOTLOGDIRS:%=$(ROOTVARUUCP)/%) 103 104ROOTPROG = $(USERPROG:%=$(ROOTBIN)/%) 105ROOTSPROG = $(SBINPROG:%=$(ROOTUSRSBIN)/%) 106ROOTSHELLS = $(BINSHELLS:%=$(ROOTBIN)/%) 107ROOTUUCPPROG = $(UUCPPROG:%=$(ROOTLIBUUCP)/%) 108ROOTLIBSHELLS = $(LIBSHELLS:%=$(ROOTLIBUUCP)/%) 109ROOTCRONTAB = $(CRONTAB:%=$(ROOTLIBUUCP)/%) 110ROOTFILES = $(FILES:%=$(ROOTETCUUCP)/%) 111 112ROOTDIRS = $(ROOTLIBUUCP) $(ROOTETCUUCP) $(ROOTSPLOCKS) \ 113 $(ROOTDOTDIRS) $(ROOTDOTSPDIRS) $(ROOTDOTLOGDIRS) 114 115ROOTSYMDIRS = $(DOTDIRS:%=$(ROOTSPUUCP)/%) 116SYMDEST = ../../uucp 117ROOTREMOTE = $(ROOTETCUUCP)/remote.unknown 118REMOTESYMDEST = ../../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 140include ./Makefile.inc 141 142.KEEP_STATE: 143 144all: $(TXTFILES) $(PROG) $(SHELLS) 145 146install: $(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 173check: $(CHKMANIFEST) 174 175clean: 176 $(RM) $(CLEANFILES) 177 178lint: lint_SRCS 179 180strip: 181 $(STRIP) $(PROG) 182 183# special rules for 'common', since it lives in chmod's directory 184 185common.o: ../chmod/common.c 186 $(COMPILE.c) -o $@ ../chmod/common.c 187 188common.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 195include ../Makefile.targ 196