xref: /titanic_41/usr/src/lib/libsecdb/Makefile (revision 726fad2a65f16c200a03969c29cb5c86c2d427db)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26include ../Makefile.lib
27
28SUBDIRS =	help $(MACH)
29$(BUILD64)SUBDIRS += $(MACH64)
30
31MSGSUBDIRS=	help
32
33all:=		TARGET= all
34clean:=		TARGET= clean
35clobber:=	TARGET= clobber
36install:=	TARGET= install
37lint:=		TARGET= lint
38_msg:=		TARGET= _msg
39
40.KEEP_STATE:
41
42ROOTETC = 		$(ROOT)/etc
43ROOTETCSECURITY =	$(ROOTETC)/security
44
45EFILES =	user_attr
46EFILESRC =	$(EFILES:%=%)
47ETCFILES =	$(EFILES:%=$(ROOTETC)/%)
48ETCDFILES =	$(EFILES:%=$(ROOTETC)/%.d/SUNWcs)
49
50ESDFILES =	auth_attr exec_attr prof_attr
51ESFILES =		$(ESDFILES) policy.conf
52ESSRC =			$(ESFILES:%=%)
53ETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
54ETCSECURITYDFILES =	$(ESDFILES:%=$(ROOTETCSECURITY)/%.d/SUNWcs)
55
56
57MFSTFILES =	rbac.xml
58MANIFESTDIR =	$(ROOT)/lib/svc/manifest/system
59MANIFEST =	$(MFSTFILES:%=$(MANIFESTDIR)/%)
60$(MANIFEST) :=	FILEMODE = 0444
61
62METHODFILES =	svc-rbac
63METHODDIR =	$(ROOT)/lib/svc/method
64METHOD =	$(METHODFILES:%=$(METHODDIR)/%)
65$(METHOD) :=	FILEMODE = 0555
66
67SCRIPTS =		i.rbac r.rbac
68CLASS_SCR_SRC_DIR =	common
69INSTALL_DIR =		$(ROOT)/usr/sadm/install
70
71CLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
72
73CLASS_SCR_FILES =	$(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
74$(CLASS_SCR_FILES) :=	FILEMODE = 0555
75
76all clean clobber delete install lint package: $(SUBDIRS)
77_msg: $(MSGSUBDIRS)
78
79install:	install_data
80
81install_data:	$(ETCSECURITYFILES) $(ETCSECURITYDFILES) $(ETCFILES) \
82		$(ETCDFILES) $(CLASS_SCR_FILES) $(MANIFESTDIR) $(MANIFEST) \
83		$(METHODDIR) $(METHOD)
84
85ATTR_FILES =	auth_attr exec_attr prof_attr user_attr
86${ATTR_FILES}:	$$@.txt
87	> $@
88	$(ECHO) $@.txt $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
89
90$(ETCSECURITYDFILES) $(ETCDFILES): $$(@D)
91
92$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
93
94$(ETCSECURITY)/%: %
95	$(INS.file)
96
97$(ROOTETCSECURITY):
98	$(INS.dir)
99
100$(ROOTETCSECURITY)/%: %
101	$(INS.file)
102
103$(ROOTETCSECURITY)/%.d/SUNWcs: %
104	$(INS.rename)
105
106$(ROOTETC)/% : %
107	$(INS.file)
108
109$(ROOTETC)/%.d/SUNWcs: %
110	$(INS.rename)
111
112$(MANIFESTDIR):
113	$(INS.dir)
114
115$(MANIFESTDIR)/% : %
116	$(INS.file)
117
118$(METHODDIR):
119	$(INS.dir)
120
121$(METHODDIR)/% : %
122	$(INS.file)
123
124$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
125
126$(INSTALL_DIR):
127	$(INS.dir)
128
129$(CLASS_SCR_DIR):
130	$(INS.dir)
131
132$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
133	$(INS.file)
134
135clobber clean:
136	$(RM) $(ATTR_FILES)
137
138$(SUBDIRS):	FRC
139	@cd $@; pwd; $(MAKE) $(TARGET)
140
141FRC:
142