xref: /titanic_50/usr/src/lib/libsecdb/Makefile (revision 1099afd7a24ed1f7d94bdae249576a66e1952d05)
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 (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25include ../Makefile.lib
26
27SUBDIRS =	help $(MACH)
28$(BUILD64)SUBDIRS += $(MACH64)
29
30MSGSUBDIRS=	help
31
32all:=		TARGET= all
33clean:=		TARGET= clean
34clobber:=	TARGET= clobber
35install:=	TARGET= install
36lint:=		TARGET= lint
37_msg:=		TARGET= _msg
38
39.KEEP_STATE:
40
41ROOTETC = 		$(ROOT)/etc
42ROOTETCSECURITY =	$(ROOTETC)/security
43
44EFILES =	user_attr
45EFILESRC =	$(EFILES:%=%)
46ETCFILES =	$(EFILES:%=$(ROOTETC)/%)
47ETCDFILES =	$(EFILES:%=$(ROOTETC)/%.d/SUNWcs)
48
49ESDFILES =	auth_attr exec_attr prof_attr
50ESFILES =		$(ESDFILES) policy.conf
51ESSRC =			$(ESFILES:%=%)
52ETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
53ETCSECURITYDFILES =	$(ESDFILES:%=$(ROOTETCSECURITY)/%.d/SUNWcs)
54
55
56MFSTFILES =	rbac.xml
57MANIFESTDIR =	$(ROOT)/lib/svc/manifest/system
58MANIFEST =	$(MFSTFILES:%=$(MANIFESTDIR)/%)
59$(MANIFEST) :=	FILEMODE = 0444
60
61METHODFILES =	svc-rbac
62METHODDIR =	$(ROOT)/lib/svc/method
63METHOD =	$(METHODFILES:%=$(METHODDIR)/%)
64$(METHOD) :=	FILEMODE = 0555
65
66SCRIPTS =		i.rbac r.rbac
67CLASS_SCR_SRC_DIR =	common
68INSTALL_DIR =		$(ROOT)/usr/sadm/install
69
70CLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
71
72CLASS_SCR_FILES =	$(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
73$(CLASS_SCR_FILES) :=	FILEMODE = 0555
74
75all clean clobber delete install lint package: $(SUBDIRS)
76_msg: $(MSGSUBDIRS)
77
78install:	install_data
79
80install_data:	$(ETCSECURITYFILES) $(ETCSECURITYDFILES) $(ETCFILES) \
81		$(ETCDFILES) $(CLASS_SCR_FILES) $(MANIFESTDIR) $(MANIFEST) \
82		$(METHODDIR) $(METHOD)
83
84ATTR_FILES =	auth_attr exec_attr prof_attr user_attr
85${ATTR_FILES}:	$$@.txt ${CLASS_SCR_SRC_DIR}/i.rbac
86	> $@
87	$(ECHO) $@.txt $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
88
89$(ETCSECURITYDFILES) $(ETCDFILES): $$(@D)
90
91$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
92
93$(ETCSECURITY)/%: %
94	$(INS.file)
95
96$(ROOTETCSECURITY):
97	$(INS.dir)
98
99$(ROOTETCSECURITY)/%: %
100	$(INS.file)
101
102$(ROOTETCSECURITY)/%.d/SUNWcs: %
103	$(INS.rename)
104
105$(ROOTETC)/% : %
106	$(INS.file)
107
108$(ROOTETC)/%.d/SUNWcs: %
109	$(INS.rename)
110
111$(MANIFESTDIR):
112	$(INS.dir)
113
114$(MANIFESTDIR)/% : %
115	$(INS.file)
116
117$(METHODDIR):
118	$(INS.dir)
119
120$(METHODDIR)/% : %
121	$(INS.file)
122
123$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
124
125$(INSTALL_DIR):
126	$(INS.dir)
127
128$(CLASS_SCR_DIR):
129	$(INS.dir)
130
131$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
132	$(INS.file)
133
134clobber clean:
135	$(RM) $(ATTR_FILES)
136
137$(SUBDIRS):	FRC
138	@cd $@; pwd; $(MAKE) $(TARGET)
139
140FRC:
141