xref: /illumos-gate/usr/src/lib/libsecdb/Makefile (revision f808c858)
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
5*f808c858Sraf# Common Development and Distribution License (the "License").
6*f808c858Sraf# 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*f808c858Sraf# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
25*f808c858Sraf# ident	"%Z%%M%	%I%	%E% SMI"
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateinclude ../Makefile.lib
297c478bd9Sstevel@tonic-gate
30*f808c858SrafSUBDIRS =	help $(MACH)
31*f808c858Sraf$(BUILD64)SUBDIRS += $(MACH64)
32*f808c858Sraf
337c478bd9Sstevel@tonic-gateMSGSUBDIRS=	help
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateall:=		TARGET= all
367c478bd9Sstevel@tonic-gateclean:=		TARGET= clean
377c478bd9Sstevel@tonic-gateclobber:=	TARGET= clobber
387c478bd9Sstevel@tonic-gateinstall:=	TARGET= install
397c478bd9Sstevel@tonic-gatelint:=		TARGET= lint
407c478bd9Sstevel@tonic-gate_msg:=		TARGET= _msg
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gate.KEEP_STATE:
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gateROOTETC = 		$(ROOT)/etc
457c478bd9Sstevel@tonic-gateROOTETCSECURITY =	$(ROOTETC)/security
467c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY) :=	GROUP = sys
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gateEFILES =	user_attr
497c478bd9Sstevel@tonic-gateEFILESRC =	$(EFILES:%=%)
507c478bd9Sstevel@tonic-gateETCFILES =	$(EFILES:%=$(ROOTETC)/%)
517c478bd9Sstevel@tonic-gate$(ETCFILES) :=	GROUP = sys
527c478bd9Sstevel@tonic-gate
537c478bd9Sstevel@tonic-gateESFILES =		auth_attr exec_attr prof_attr policy.conf
547c478bd9Sstevel@tonic-gateESSRC =			$(ESFILES:%=%)
557c478bd9Sstevel@tonic-gateETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
567c478bd9Sstevel@tonic-gate$(ETCSECURITYFILES) :=	GROUP = sys
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gateSCRIPTS =		i.rbac r.rbac
597c478bd9Sstevel@tonic-gateCLASS_SCR_SRC_DIR =	$(SRC)/pkgdefs/common_files
607c478bd9Sstevel@tonic-gateINSTALL_DIR =		$(ROOT)/usr/sadm/install
617c478bd9Sstevel@tonic-gate$(INSTALL_DIR) :=	GROUP = bin
627c478bd9Sstevel@tonic-gate
637c478bd9Sstevel@tonic-gateCLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
647c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR) :=	GROUP = bin
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gateCLASS_SCR_FILES =	$(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
677c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES) :=	FILEMODE = 0555
687c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES) :=	GROUP = sys
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gateTMPDIR =	/tmp
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gateall clean clobber delete install lint package: $(SUBDIRS)
737c478bd9Sstevel@tonic-gate_msg: $(MSGSUBDIRS)
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gateinstall:	install_data
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gateinstall_data:	$(ETCSECURITYFILES) $(ETCFILES) $(CLASS_SCR_FILES)
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gateATTR_FILES =	auth_attr exec_attr prof_attr user_attr
807c478bd9Sstevel@tonic-gate${ATTR_FILES}:	$$@.txt
817c478bd9Sstevel@tonic-gate	$(CP) $@.txt ${TMPDIR}/$@
827c478bd9Sstevel@tonic-gate	> $@
837c478bd9Sstevel@tonic-gate	$(ECHO) ${TMPDIR}/$@ $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
847c478bd9Sstevel@tonic-gate	@$(RM) ${TMPDIR}/$@
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gate$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
877c478bd9Sstevel@tonic-gate
887c478bd9Sstevel@tonic-gate$(ETCSECURITY)/%: %
897c478bd9Sstevel@tonic-gate	$(INS.file)
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY):
927c478bd9Sstevel@tonic-gate	$(INS.dir)
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY)/%: %
957c478bd9Sstevel@tonic-gate	$(INS.file)
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gate$(ROOTETC)/% : %
987c478bd9Sstevel@tonic-gate	$(INS.file)
997c478bd9Sstevel@tonic-gate
1007c478bd9Sstevel@tonic-gate$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
1017c478bd9Sstevel@tonic-gate
1027c478bd9Sstevel@tonic-gate$(INSTALL_DIR):
1037c478bd9Sstevel@tonic-gate	$(INS.dir)
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR):
1067c478bd9Sstevel@tonic-gate	$(INS.dir)
1077c478bd9Sstevel@tonic-gate
1087c478bd9Sstevel@tonic-gate$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
1097c478bd9Sstevel@tonic-gate	$(INS.file)
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gateclobber clean:
1127c478bd9Sstevel@tonic-gate	$(RM) $(ATTR_FILES)
1137c478bd9Sstevel@tonic-gate
114*f808c858Sraf$(SUBDIRS):	FRC
1157c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
1167c478bd9Sstevel@tonic-gate
1177c478bd9Sstevel@tonic-gateFRC:
118