xref: /titanic_51/usr/src/lib/libsecdb/Makefile (revision 06d0f3f39e2f7b67190578d7277d559c32191d6c)
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*06d0f3f3SCasper H.S. Dik# Copyright 2009 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$(ROOTETCSECURITY) :=	GROUP = sys
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gateEFILES =	user_attr
477c478bd9Sstevel@tonic-gateEFILESRC =	$(EFILES:%=%)
487c478bd9Sstevel@tonic-gateETCFILES =	$(EFILES:%=$(ROOTETC)/%)
497c478bd9Sstevel@tonic-gate$(ETCFILES) :=	GROUP = sys
507c478bd9Sstevel@tonic-gate
517c478bd9Sstevel@tonic-gateESFILES =		auth_attr exec_attr prof_attr policy.conf
527c478bd9Sstevel@tonic-gateESSRC =			$(ESFILES:%=%)
537c478bd9Sstevel@tonic-gateETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
547c478bd9Sstevel@tonic-gate$(ETCSECURITYFILES) :=	GROUP = sys
557c478bd9Sstevel@tonic-gate
56*06d0f3f3SCasper H.S. DikMFSTFILES =	rbac.xml
57*06d0f3f3SCasper H.S. DikMANIFESTDIR =	$(ROOT)/var/svc/manifest/system
58*06d0f3f3SCasper H.S. DikMANIFEST =	$(MFSTFILES:%=$(MANIFESTDIR)/%)
59*06d0f3f3SCasper H.S. Dik$(MANIFEST) :=	FILEMODE = 0444
60*06d0f3f3SCasper H.S. Dik$(MANIFEST) :=	GROUP = sys
61*06d0f3f3SCasper H.S. Dik
62*06d0f3f3SCasper H.S. DikMETHODFILES =	svc-rbac
63*06d0f3f3SCasper H.S. DikMETHODDIR =	$(ROOT)/lib/svc/method
64*06d0f3f3SCasper H.S. DikMETHOD =	$(METHODFILES:%=$(METHODDIR)/%)
65*06d0f3f3SCasper H.S. Dik$(METHOD) :=	FILEMODE = 0555
66*06d0f3f3SCasper H.S. Dik$(METHOD) :=	GROUP = bin
67*06d0f3f3SCasper H.S. Dik
687c478bd9Sstevel@tonic-gateSCRIPTS =		i.rbac r.rbac
697c478bd9Sstevel@tonic-gateCLASS_SCR_SRC_DIR =	$(SRC)/pkgdefs/common_files
707c478bd9Sstevel@tonic-gateINSTALL_DIR =		$(ROOT)/usr/sadm/install
717c478bd9Sstevel@tonic-gate$(INSTALL_DIR) :=	GROUP = bin
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gateCLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
747c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR) :=	GROUP = bin
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gateCLASS_SCR_FILES =	$(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
777c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES) :=	FILEMODE = 0555
787c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES) :=	GROUP = sys
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gateall clean clobber delete install lint package: $(SUBDIRS)
817c478bd9Sstevel@tonic-gate_msg: $(MSGSUBDIRS)
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gateinstall:	install_data
847c478bd9Sstevel@tonic-gate
85*06d0f3f3SCasper H.S. Dikinstall_data:	$(ETCSECURITYFILES) $(ETCFILES) $(CLASS_SCR_FILES) \
86*06d0f3f3SCasper H.S. Dik	$(MANIFESTDIR) $(MANIFEST) $(METHODDIR) $(METHOD)
877c478bd9Sstevel@tonic-gate
887c478bd9Sstevel@tonic-gateATTR_FILES =	auth_attr exec_attr prof_attr user_attr
897c478bd9Sstevel@tonic-gate${ATTR_FILES}:	$$@.txt
907c478bd9Sstevel@tonic-gate	> $@
91*06d0f3f3SCasper H.S. Dik	$(ECHO) $@.txt $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate$(ETCSECURITY)/%: %
967c478bd9Sstevel@tonic-gate	$(INS.file)
977c478bd9Sstevel@tonic-gate
987c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY):
997c478bd9Sstevel@tonic-gate	$(INS.dir)
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY)/%: %
1027c478bd9Sstevel@tonic-gate	$(INS.file)
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gate$(ROOTETC)/% : %
1057c478bd9Sstevel@tonic-gate	$(INS.file)
1067c478bd9Sstevel@tonic-gate
107*06d0f3f3SCasper H.S. Dik$(MANIFESTDIR):
108*06d0f3f3SCasper H.S. Dik	$(INS.dir)
109*06d0f3f3SCasper H.S. Dik
110*06d0f3f3SCasper H.S. Dik$(MANIFESTDIR)/% : %
111*06d0f3f3SCasper H.S. Dik	$(INS.file)
112*06d0f3f3SCasper H.S. Dik
113*06d0f3f3SCasper H.S. Dik$(METHODDIR):
114*06d0f3f3SCasper H.S. Dik	$(INS.dir)
115*06d0f3f3SCasper H.S. Dik
116*06d0f3f3SCasper H.S. Dik$(METHODDIR)/% : %
117*06d0f3f3SCasper H.S. Dik	$(INS.file)
118*06d0f3f3SCasper H.S. Dik
1197c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gate$(INSTALL_DIR):
1227c478bd9Sstevel@tonic-gate	$(INS.dir)
1237c478bd9Sstevel@tonic-gate
1247c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR):
1257c478bd9Sstevel@tonic-gate	$(INS.dir)
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
1287c478bd9Sstevel@tonic-gate	$(INS.file)
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gateclobber clean:
1317c478bd9Sstevel@tonic-gate	$(RM) $(ATTR_FILES)
1327c478bd9Sstevel@tonic-gate
133f808c858Sraf$(SUBDIRS):	FRC
1347c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
1357c478bd9Sstevel@tonic-gate
1367c478bd9Sstevel@tonic-gateFRC:
137