xref: /illumos-gate/usr/src/lib/libsecdb/Makefile (revision 06d0f3f39e2f7b67190578d7277d559c32191d6c)
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 2009 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$(ROOTETCSECURITY) :=	GROUP = sys
45
46EFILES =	user_attr
47EFILESRC =	$(EFILES:%=%)
48ETCFILES =	$(EFILES:%=$(ROOTETC)/%)
49$(ETCFILES) :=	GROUP = sys
50
51ESFILES =		auth_attr exec_attr prof_attr policy.conf
52ESSRC =			$(ESFILES:%=%)
53ETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
54$(ETCSECURITYFILES) :=	GROUP = sys
55
56MFSTFILES =	rbac.xml
57MANIFESTDIR =	$(ROOT)/var/svc/manifest/system
58MANIFEST =	$(MFSTFILES:%=$(MANIFESTDIR)/%)
59$(MANIFEST) :=	FILEMODE = 0444
60$(MANIFEST) :=	GROUP = sys
61
62METHODFILES =	svc-rbac
63METHODDIR =	$(ROOT)/lib/svc/method
64METHOD =	$(METHODFILES:%=$(METHODDIR)/%)
65$(METHOD) :=	FILEMODE = 0555
66$(METHOD) :=	GROUP = bin
67
68SCRIPTS =		i.rbac r.rbac
69CLASS_SCR_SRC_DIR =	$(SRC)/pkgdefs/common_files
70INSTALL_DIR =		$(ROOT)/usr/sadm/install
71$(INSTALL_DIR) :=	GROUP = bin
72
73CLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
74$(CLASS_SCR_DIR) :=	GROUP = bin
75
76CLASS_SCR_FILES =	$(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
77$(CLASS_SCR_FILES) :=	FILEMODE = 0555
78$(CLASS_SCR_FILES) :=	GROUP = sys
79
80all clean clobber delete install lint package: $(SUBDIRS)
81_msg: $(MSGSUBDIRS)
82
83install:	install_data
84
85install_data:	$(ETCSECURITYFILES) $(ETCFILES) $(CLASS_SCR_FILES) \
86	$(MANIFESTDIR) $(MANIFEST) $(METHODDIR) $(METHOD)
87
88ATTR_FILES =	auth_attr exec_attr prof_attr user_attr
89${ATTR_FILES}:	$$@.txt
90	> $@
91	$(ECHO) $@.txt $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
92
93$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
94
95$(ETCSECURITY)/%: %
96	$(INS.file)
97
98$(ROOTETCSECURITY):
99	$(INS.dir)
100
101$(ROOTETCSECURITY)/%: %
102	$(INS.file)
103
104$(ROOTETC)/% : %
105	$(INS.file)
106
107$(MANIFESTDIR):
108	$(INS.dir)
109
110$(MANIFESTDIR)/% : %
111	$(INS.file)
112
113$(METHODDIR):
114	$(INS.dir)
115
116$(METHODDIR)/% : %
117	$(INS.file)
118
119$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
120
121$(INSTALL_DIR):
122	$(INS.dir)
123
124$(CLASS_SCR_DIR):
125	$(INS.dir)
126
127$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
128	$(INS.file)
129
130clobber clean:
131	$(RM) $(ATTR_FILES)
132
133$(SUBDIRS):	FRC
134	@cd $@; pwd; $(MAKE) $(TARGET)
135
136FRC:
137