xref: /illumos-gate/usr/src/lib/libsecdb/Makefile (revision 1099afd7)
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#
22*1099afd7SNathan 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-gatelint:=		TARGET= lint
377c478bd9Sstevel@tonic-gate_msg:=		TARGET= _msg
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gate.KEEP_STATE:
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gateROOTETC = 		$(ROOT)/etc
427c478bd9Sstevel@tonic-gateROOTETCSECURITY =	$(ROOTETC)/security
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gateEFILES =	user_attr
457c478bd9Sstevel@tonic-gateEFILESRC =	$(EFILES:%=%)
467c478bd9Sstevel@tonic-gateETCFILES =	$(EFILES:%=$(ROOTETC)/%)
47ead1f93eSLiane PrazaETCDFILES =	$(EFILES:%=$(ROOTETC)/%.d/SUNWcs)
487c478bd9Sstevel@tonic-gate
49ead1f93eSLiane PrazaESDFILES =	auth_attr exec_attr prof_attr
50ead1f93eSLiane PrazaESFILES =		$(ESDFILES) policy.conf
517c478bd9Sstevel@tonic-gateESSRC =			$(ESFILES:%=%)
527c478bd9Sstevel@tonic-gateETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
53ead1f93eSLiane PrazaETCSECURITYDFILES =	$(ESDFILES:%=$(ROOTETCSECURITY)/%.d/SUNWcs)
54ead1f93eSLiane Praza
557c478bd9Sstevel@tonic-gate
5606d0f3f3SCasper H.S. DikMFSTFILES =	rbac.xml
579444c26fSTom WhittenMANIFESTDIR =	$(ROOT)/lib/svc/manifest/system
5806d0f3f3SCasper H.S. DikMANIFEST =	$(MFSTFILES:%=$(MANIFESTDIR)/%)
5906d0f3f3SCasper H.S. Dik$(MANIFEST) :=	FILEMODE = 0444
6006d0f3f3SCasper H.S. Dik
6106d0f3f3SCasper H.S. DikMETHODFILES =	svc-rbac
6206d0f3f3SCasper H.S. DikMETHODDIR =	$(ROOT)/lib/svc/method
6306d0f3f3SCasper H.S. DikMETHOD =	$(METHODFILES:%=$(METHODDIR)/%)
6406d0f3f3SCasper H.S. Dik$(METHOD) :=	FILEMODE = 0555
6506d0f3f3SCasper H.S. Dik
667c478bd9Sstevel@tonic-gateSCRIPTS =		i.rbac r.rbac
67ead1f93eSLiane PrazaCLASS_SCR_SRC_DIR =	common
687c478bd9Sstevel@tonic-gateINSTALL_DIR =		$(ROOT)/usr/sadm/install
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gateCLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gateCLASS_SCR_FILES =	$(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
737c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES) :=	FILEMODE = 0555
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gateall clean clobber delete install lint package: $(SUBDIRS)
767c478bd9Sstevel@tonic-gate_msg: $(MSGSUBDIRS)
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gateinstall:	install_data
797c478bd9Sstevel@tonic-gate
80ead1f93eSLiane Prazainstall_data:	$(ETCSECURITYFILES) $(ETCSECURITYDFILES) $(ETCFILES) \
81ead1f93eSLiane Praza		$(ETCDFILES) $(CLASS_SCR_FILES) $(MANIFESTDIR) $(MANIFEST) \
82ead1f93eSLiane Praza		$(METHODDIR) $(METHOD)
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gateATTR_FILES =	auth_attr exec_attr prof_attr user_attr
85*1099afd7SNathan Bush${ATTR_FILES}:	$$@.txt ${CLASS_SCR_SRC_DIR}/i.rbac
867c478bd9Sstevel@tonic-gate	> $@
8706d0f3f3SCasper H.S. Dik	$(ECHO) $@.txt $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
887c478bd9Sstevel@tonic-gate
89ead1f93eSLiane Praza$(ETCSECURITYDFILES) $(ETCDFILES): $$(@D)
90ead1f93eSLiane Praza
917c478bd9Sstevel@tonic-gate$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate$(ETCSECURITY)/%: %
947c478bd9Sstevel@tonic-gate	$(INS.file)
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY):
977c478bd9Sstevel@tonic-gate	$(INS.dir)
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY)/%: %
1007c478bd9Sstevel@tonic-gate	$(INS.file)
1017c478bd9Sstevel@tonic-gate
102ead1f93eSLiane Praza$(ROOTETCSECURITY)/%.d/SUNWcs: %
103ead1f93eSLiane Praza	$(INS.rename)
104ead1f93eSLiane Praza
1057c478bd9Sstevel@tonic-gate$(ROOTETC)/% : %
1067c478bd9Sstevel@tonic-gate	$(INS.file)
1077c478bd9Sstevel@tonic-gate
108ead1f93eSLiane Praza$(ROOTETC)/%.d/SUNWcs: %
109ead1f93eSLiane Praza	$(INS.rename)
110ead1f93eSLiane Praza
11106d0f3f3SCasper H.S. Dik$(MANIFESTDIR):
11206d0f3f3SCasper H.S. Dik	$(INS.dir)
11306d0f3f3SCasper H.S. Dik
11406d0f3f3SCasper H.S. Dik$(MANIFESTDIR)/% : %
11506d0f3f3SCasper H.S. Dik	$(INS.file)
11606d0f3f3SCasper H.S. Dik
11706d0f3f3SCasper H.S. Dik$(METHODDIR):
11806d0f3f3SCasper H.S. Dik	$(INS.dir)
11906d0f3f3SCasper H.S. Dik
12006d0f3f3SCasper H.S. Dik$(METHODDIR)/% : %
12106d0f3f3SCasper H.S. Dik	$(INS.file)
12206d0f3f3SCasper H.S. Dik
1237c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
1247c478bd9Sstevel@tonic-gate
1257c478bd9Sstevel@tonic-gate$(INSTALL_DIR):
1267c478bd9Sstevel@tonic-gate	$(INS.dir)
1277c478bd9Sstevel@tonic-gate
1287c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR):
1297c478bd9Sstevel@tonic-gate	$(INS.dir)
1307c478bd9Sstevel@tonic-gate
1317c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
1327c478bd9Sstevel@tonic-gate	$(INS.file)
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gateclobber clean:
1357c478bd9Sstevel@tonic-gate	$(RM) $(ATTR_FILES)
1367c478bd9Sstevel@tonic-gate
137f808c858Sraf$(SUBDIRS):	FRC
1387c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
1397c478bd9Sstevel@tonic-gate
1407c478bd9Sstevel@tonic-gateFRC:
141