xref: /titanic_51/usr/src/lib/libsecdb/Makefile (revision ead1f93ee620d7580f7e53350fe5a884fc4f158a)
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*ead1f93eSLiane Praza# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gateinclude ../Makefile.lib
277c478bd9Sstevel@tonic-gate
28f808c858SrafSUBDIRS =	help $(MACH)
29f808c858Sraf$(BUILD64)SUBDIRS += $(MACH64)
30f808c858Sraf
317c478bd9Sstevel@tonic-gateMSGSUBDIRS=	help
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateall:=		TARGET= all
347c478bd9Sstevel@tonic-gateclean:=		TARGET= clean
357c478bd9Sstevel@tonic-gateclobber:=	TARGET= clobber
367c478bd9Sstevel@tonic-gateinstall:=	TARGET= install
377c478bd9Sstevel@tonic-gatelint:=		TARGET= lint
387c478bd9Sstevel@tonic-gate_msg:=		TARGET= _msg
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gate.KEEP_STATE:
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gateROOTETC = 		$(ROOT)/etc
437c478bd9Sstevel@tonic-gateROOTETCSECURITY =	$(ROOTETC)/security
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gateEFILES =	user_attr
467c478bd9Sstevel@tonic-gateEFILESRC =	$(EFILES:%=%)
477c478bd9Sstevel@tonic-gateETCFILES =	$(EFILES:%=$(ROOTETC)/%)
48*ead1f93eSLiane PrazaETCDFILES =	$(EFILES:%=$(ROOTETC)/%.d/SUNWcs)
497c478bd9Sstevel@tonic-gate
50*ead1f93eSLiane PrazaESDFILES =	auth_attr exec_attr prof_attr
51*ead1f93eSLiane PrazaESFILES =		$(ESDFILES) policy.conf
527c478bd9Sstevel@tonic-gateESSRC =			$(ESFILES:%=%)
537c478bd9Sstevel@tonic-gateETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
54*ead1f93eSLiane PrazaETCSECURITYDFILES =	$(ESDFILES:%=$(ROOTETCSECURITY)/%.d/SUNWcs)
55*ead1f93eSLiane Praza
567c478bd9Sstevel@tonic-gate
5706d0f3f3SCasper H.S. DikMFSTFILES =	rbac.xml
5806d0f3f3SCasper H.S. DikMANIFESTDIR =	$(ROOT)/var/svc/manifest/system
5906d0f3f3SCasper H.S. DikMANIFEST =	$(MFSTFILES:%=$(MANIFESTDIR)/%)
6006d0f3f3SCasper H.S. Dik$(MANIFEST) :=	FILEMODE = 0444
6106d0f3f3SCasper H.S. Dik
6206d0f3f3SCasper H.S. DikMETHODFILES =	svc-rbac
6306d0f3f3SCasper H.S. DikMETHODDIR =	$(ROOT)/lib/svc/method
6406d0f3f3SCasper H.S. DikMETHOD =	$(METHODFILES:%=$(METHODDIR)/%)
6506d0f3f3SCasper H.S. Dik$(METHOD) :=	FILEMODE = 0555
6606d0f3f3SCasper H.S. Dik
677c478bd9Sstevel@tonic-gateSCRIPTS =		i.rbac r.rbac
68*ead1f93eSLiane PrazaCLASS_SCR_SRC_DIR =	common
697c478bd9Sstevel@tonic-gateINSTALL_DIR =		$(ROOT)/usr/sadm/install
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateCLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gateCLASS_SCR_FILES =	$(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
747c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES) :=	FILEMODE = 0555
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gateall clean clobber delete install lint package: $(SUBDIRS)
777c478bd9Sstevel@tonic-gate_msg: $(MSGSUBDIRS)
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gateinstall:	install_data
807c478bd9Sstevel@tonic-gate
81*ead1f93eSLiane Prazainstall_data:	$(ETCSECURITYFILES) $(ETCSECURITYDFILES) $(ETCFILES) \
82*ead1f93eSLiane Praza		$(ETCDFILES) $(CLASS_SCR_FILES) $(MANIFESTDIR) $(MANIFEST) \
83*ead1f93eSLiane Praza		$(METHODDIR) $(METHOD)
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gateATTR_FILES =	auth_attr exec_attr prof_attr user_attr
867c478bd9Sstevel@tonic-gate${ATTR_FILES}:	$$@.txt
877c478bd9Sstevel@tonic-gate	> $@
8806d0f3f3SCasper H.S. Dik	$(ECHO) $@.txt $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
897c478bd9Sstevel@tonic-gate
90*ead1f93eSLiane Praza$(ETCSECURITYDFILES) $(ETCDFILES): $$(@D)
91*ead1f93eSLiane Praza
927c478bd9Sstevel@tonic-gate$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gate$(ETCSECURITY)/%: %
957c478bd9Sstevel@tonic-gate	$(INS.file)
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY):
987c478bd9Sstevel@tonic-gate	$(INS.dir)
997c478bd9Sstevel@tonic-gate
1007c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY)/%: %
1017c478bd9Sstevel@tonic-gate	$(INS.file)
1027c478bd9Sstevel@tonic-gate
103*ead1f93eSLiane Praza$(ROOTETCSECURITY)/%.d/SUNWcs: %
104*ead1f93eSLiane Praza	$(INS.rename)
105*ead1f93eSLiane Praza
1067c478bd9Sstevel@tonic-gate$(ROOTETC)/% : %
1077c478bd9Sstevel@tonic-gate	$(INS.file)
1087c478bd9Sstevel@tonic-gate
109*ead1f93eSLiane Praza$(ROOTETC)/%.d/SUNWcs: %
110*ead1f93eSLiane Praza	$(INS.rename)
111*ead1f93eSLiane Praza
11206d0f3f3SCasper H.S. Dik$(MANIFESTDIR):
11306d0f3f3SCasper H.S. Dik	$(INS.dir)
11406d0f3f3SCasper H.S. Dik
11506d0f3f3SCasper H.S. Dik$(MANIFESTDIR)/% : %
11606d0f3f3SCasper H.S. Dik	$(INS.file)
11706d0f3f3SCasper H.S. Dik
11806d0f3f3SCasper H.S. Dik$(METHODDIR):
11906d0f3f3SCasper H.S. Dik	$(INS.dir)
12006d0f3f3SCasper H.S. Dik
12106d0f3f3SCasper H.S. Dik$(METHODDIR)/% : %
12206d0f3f3SCasper H.S. Dik	$(INS.file)
12306d0f3f3SCasper H.S. Dik
1247c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
1257c478bd9Sstevel@tonic-gate
1267c478bd9Sstevel@tonic-gate$(INSTALL_DIR):
1277c478bd9Sstevel@tonic-gate	$(INS.dir)
1287c478bd9Sstevel@tonic-gate
1297c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR):
1307c478bd9Sstevel@tonic-gate	$(INS.dir)
1317c478bd9Sstevel@tonic-gate
1327c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
1337c478bd9Sstevel@tonic-gate	$(INS.file)
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gateclobber clean:
1367c478bd9Sstevel@tonic-gate	$(RM) $(ATTR_FILES)
1377c478bd9Sstevel@tonic-gate
138f808c858Sraf$(SUBDIRS):	FRC
1397c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
1407c478bd9Sstevel@tonic-gate
1417c478bd9Sstevel@tonic-gateFRC:
142