xref: /illumos-gate/usr/src/lib/libsecdb/Makefile (revision 241c90a0)
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
5f808c858Sraf# Common Development and Distribution License (the "License").
6f808c858Sraf# 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#
221099afd7SNathan Bush# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
237c478bd9Sstevel@tonic-gate#
247c478bd9Sstevel@tonic-gate
257c478bd9Sstevel@tonic-gateinclude ../Makefile.lib
267c478bd9Sstevel@tonic-gate
27f808c858SrafSUBDIRS =	help $(MACH)
28f808c858Sraf$(BUILD64)SUBDIRS += $(MACH64)
29f808c858Sraf
307c478bd9Sstevel@tonic-gateMSGSUBDIRS=	help
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateall:=		TARGET= all
337c478bd9Sstevel@tonic-gateclean:=		TARGET= clean
347c478bd9Sstevel@tonic-gateclobber:=	TARGET= clobber
357c478bd9Sstevel@tonic-gateinstall:=	TARGET= install
367c478bd9Sstevel@tonic-gate_msg:=		TARGET= _msg
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gate.KEEP_STATE:
397c478bd9Sstevel@tonic-gate
40*241c90a0SRichard LoweROOTETC =		$(ROOT)/etc
417c478bd9Sstevel@tonic-gateROOTETCSECURITY =	$(ROOTETC)/security
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gateEFILES =	user_attr
447c478bd9Sstevel@tonic-gateEFILESRC =	$(EFILES:%=%)
457c478bd9Sstevel@tonic-gateETCFILES =	$(EFILES:%=$(ROOTETC)/%)
46ead1f93eSLiane PrazaETCDFILES =	$(EFILES:%=$(ROOTETC)/%.d/SUNWcs)
477c478bd9Sstevel@tonic-gate
48ead1f93eSLiane PrazaESDFILES =	auth_attr exec_attr prof_attr
49ead1f93eSLiane PrazaESFILES =		$(ESDFILES) policy.conf
507c478bd9Sstevel@tonic-gateESSRC =			$(ESFILES:%=%)
517c478bd9Sstevel@tonic-gateETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
52ead1f93eSLiane PrazaETCSECURITYDFILES =	$(ESDFILES:%=$(ROOTETCSECURITY)/%.d/SUNWcs)
53ead1f93eSLiane Praza
547c478bd9Sstevel@tonic-gate
5506d0f3f3SCasper H.S. DikMFSTFILES =	rbac.xml
569444c26fSTom WhittenMANIFESTDIR =	$(ROOT)/lib/svc/manifest/system
5706d0f3f3SCasper H.S. DikMANIFEST =	$(MFSTFILES:%=$(MANIFESTDIR)/%)
5806d0f3f3SCasper H.S. Dik$(MANIFEST) :=	FILEMODE = 0444
5906d0f3f3SCasper H.S. Dik
6006d0f3f3SCasper H.S. DikMETHODFILES =	svc-rbac
6106d0f3f3SCasper H.S. DikMETHODDIR =	$(ROOT)/lib/svc/method
6206d0f3f3SCasper H.S. DikMETHOD =	$(METHODFILES:%=$(METHODDIR)/%)
6306d0f3f3SCasper H.S. Dik$(METHOD) :=	FILEMODE = 0555
6406d0f3f3SCasper H.S. Dik
657c478bd9Sstevel@tonic-gateSCRIPTS =		i.rbac r.rbac
66ead1f93eSLiane PrazaCLASS_SCR_SRC_DIR =	common
677c478bd9Sstevel@tonic-gateINSTALL_DIR =		$(ROOT)/usr/sadm/install
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gateCLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateCLASS_SCR_FILES =	$(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
727c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES) :=	FILEMODE = 0555
737c478bd9Sstevel@tonic-gate
74*241c90a0SRichard Loweall clean clobber delete install package: $(SUBDIRS)
757c478bd9Sstevel@tonic-gate_msg: $(MSGSUBDIRS)
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gateinstall:	install_data
787c478bd9Sstevel@tonic-gate
79ead1f93eSLiane Prazainstall_data:	$(ETCSECURITYFILES) $(ETCSECURITYDFILES) $(ETCFILES) \
80ead1f93eSLiane Praza		$(ETCDFILES) $(CLASS_SCR_FILES) $(MANIFESTDIR) $(MANIFEST) \
81ead1f93eSLiane Praza		$(METHODDIR) $(METHOD)
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gateATTR_FILES =	auth_attr exec_attr prof_attr user_attr
841099afd7SNathan Bush${ATTR_FILES}:	$$@.txt ${CLASS_SCR_SRC_DIR}/i.rbac
857c478bd9Sstevel@tonic-gate	> $@
8606d0f3f3SCasper H.S. Dik	$(ECHO) $@.txt $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
877c478bd9Sstevel@tonic-gate
88ead1f93eSLiane Praza$(ETCSECURITYDFILES) $(ETCDFILES): $$(@D)
89ead1f93eSLiane Praza
907c478bd9Sstevel@tonic-gate$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gate$(ETCSECURITY)/%: %
937c478bd9Sstevel@tonic-gate	$(INS.file)
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY):
967c478bd9Sstevel@tonic-gate	$(INS.dir)
977c478bd9Sstevel@tonic-gate
987c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY)/%: %
997c478bd9Sstevel@tonic-gate	$(INS.file)
1007c478bd9Sstevel@tonic-gate
101ead1f93eSLiane Praza$(ROOTETCSECURITY)/%.d/SUNWcs: %
102ead1f93eSLiane Praza	$(INS.rename)
103ead1f93eSLiane Praza
1047c478bd9Sstevel@tonic-gate$(ROOTETC)/% : %
1057c478bd9Sstevel@tonic-gate	$(INS.file)
1067c478bd9Sstevel@tonic-gate
107ead1f93eSLiane Praza$(ROOTETC)/%.d/SUNWcs: %
108ead1f93eSLiane Praza	$(INS.rename)
109ead1f93eSLiane Praza
11006d0f3f3SCasper H.S. Dik$(MANIFESTDIR):
11106d0f3f3SCasper H.S. Dik	$(INS.dir)
11206d0f3f3SCasper H.S. Dik
11306d0f3f3SCasper H.S. Dik$(MANIFESTDIR)/% : %
11406d0f3f3SCasper H.S. Dik	$(INS.file)
11506d0f3f3SCasper H.S. Dik
11606d0f3f3SCasper H.S. Dik$(METHODDIR):
11706d0f3f3SCasper H.S. Dik	$(INS.dir)
11806d0f3f3SCasper H.S. Dik
11906d0f3f3SCasper H.S. Dik$(METHODDIR)/% : %
12006d0f3f3SCasper H.S. Dik	$(INS.file)
12106d0f3f3SCasper H.S. Dik
1227c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
1237c478bd9Sstevel@tonic-gate
1247c478bd9Sstevel@tonic-gate$(INSTALL_DIR):
1257c478bd9Sstevel@tonic-gate	$(INS.dir)
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR):
1287c478bd9Sstevel@tonic-gate	$(INS.dir)
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
1317c478bd9Sstevel@tonic-gate	$(INS.file)
1327c478bd9Sstevel@tonic-gate
1337c478bd9Sstevel@tonic-gateclobber clean:
1347c478bd9Sstevel@tonic-gate	$(RM) $(ATTR_FILES)
1357c478bd9Sstevel@tonic-gate
136f808c858Sraf$(SUBDIRS):	FRC
1377c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
1387c478bd9Sstevel@tonic-gate
1397c478bd9Sstevel@tonic-gateFRC:
140