xref: /titanic_41/usr/src/lib/libsecdb/Makefile (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# lib/libsecdb/Makefile
27#
28#ident	"%Z%%M%	%I%	%E% SMI"
29#
30
31include ../Makefile.lib
32
33SUBDIRS=	spec .WAIT help $(MACH) $(BUILD64) $(MACH64)
34MSGSUBDIRS=	help
35
36all:=		TARGET= all
37clean:=		TARGET= clean
38clobber:=	TARGET= clobber
39install:=	TARGET= install
40lint:=		TARGET= lint
41_msg:=		TARGET= _msg
42
43.KEEP_STATE:
44
45ROOTETC = 		$(ROOT)/etc
46ROOTETCSECURITY =	$(ROOTETC)/security
47$(ROOTETCSECURITY) :=	GROUP = sys
48
49EFILES =	user_attr
50EFILESRC =	$(EFILES:%=%)
51ETCFILES =	$(EFILES:%=$(ROOTETC)/%)
52$(ETCFILES) :=	GROUP = sys
53
54ESFILES =		auth_attr exec_attr prof_attr policy.conf
55ESSRC =			$(ESFILES:%=%)
56ETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
57$(ETCSECURITYFILES) :=	GROUP = sys
58
59SCRIPTS =		i.rbac r.rbac
60CLASS_SCR_SRC_DIR =	$(SRC)/pkgdefs/common_files
61INSTALL_DIR =		$(ROOT)/usr/sadm/install
62$(INSTALL_DIR) :=	GROUP = bin
63
64CLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
65$(CLASS_SCR_DIR) :=	GROUP = bin
66
67CLASS_SCR_FILES =	$(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
68$(CLASS_SCR_FILES) :=	FILEMODE = 0555
69$(CLASS_SCR_FILES) :=	GROUP = sys
70
71TMPDIR =	/tmp
72
73all clean clobber delete install lint package: $(SUBDIRS)
74_msg: $(MSGSUBDIRS)
75
76install:	install_data
77
78install_data:	$(ETCSECURITYFILES) $(ETCFILES) $(CLASS_SCR_FILES)
79
80ATTR_FILES =	auth_attr exec_attr prof_attr user_attr
81${ATTR_FILES}:	$$@.txt
82	$(CP) $@.txt ${TMPDIR}/$@
83	> $@
84	$(ECHO) ${TMPDIR}/$@ $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
85	@$(RM) ${TMPDIR}/$@
86
87$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
88
89$(ETCSECURITY)/%: %
90	$(INS.file)
91
92$(ROOTETCSECURITY):
93	$(INS.dir)
94
95$(ROOTETCSECURITY)/%: %
96	$(INS.file)
97
98$(ROOTETC)/% : %
99	$(INS.file)
100
101$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
102
103$(INSTALL_DIR):
104	$(INS.dir)
105
106$(CLASS_SCR_DIR):
107	$(INS.dir)
108
109$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
110	$(INS.file)
111
112clobber clean:
113	$(RM) $(ATTR_FILES)
114
115spec help $(MACH) $(MACH64) :	FRC
116	@cd $@; pwd; $(MAKE) $(TARGET)
117
118FRC:
119