xref: /titanic_41/usr/src/lib/libsecdb/Makefile (revision fcf3ce441efd61da9bb2884968af01cb7c1452cc)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28include ../Makefile.lib
29
30SUBDIRS =	help $(MACH)
31$(BUILD64)SUBDIRS += $(MACH64)
32
33MSGSUBDIRS=	help
34
35all:=		TARGET= all
36clean:=		TARGET= clean
37clobber:=	TARGET= clobber
38install:=	TARGET= install
39lint:=		TARGET= lint
40_msg:=		TARGET= _msg
41
42.KEEP_STATE:
43
44ROOTETC = 		$(ROOT)/etc
45ROOTETCSECURITY =	$(ROOTETC)/security
46$(ROOTETCSECURITY) :=	GROUP = sys
47
48EFILES =	user_attr
49EFILESRC =	$(EFILES:%=%)
50ETCFILES =	$(EFILES:%=$(ROOTETC)/%)
51$(ETCFILES) :=	GROUP = sys
52
53ESFILES =		auth_attr exec_attr prof_attr policy.conf
54ESSRC =			$(ESFILES:%=%)
55ETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
56$(ETCSECURITYFILES) :=	GROUP = sys
57
58SCRIPTS =		i.rbac r.rbac
59CLASS_SCR_SRC_DIR =	$(SRC)/pkgdefs/common_files
60INSTALL_DIR =		$(ROOT)/usr/sadm/install
61$(INSTALL_DIR) :=	GROUP = bin
62
63CLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
64$(CLASS_SCR_DIR) :=	GROUP = bin
65
66CLASS_SCR_FILES =	$(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
67$(CLASS_SCR_FILES) :=	FILEMODE = 0555
68$(CLASS_SCR_FILES) :=	GROUP = sys
69
70TMPDIR =	/tmp
71
72all clean clobber delete install lint package: $(SUBDIRS)
73_msg: $(MSGSUBDIRS)
74
75install:	install_data
76
77install_data:	$(ETCSECURITYFILES) $(ETCFILES) $(CLASS_SCR_FILES)
78
79ATTR_FILES =	auth_attr exec_attr prof_attr user_attr
80${ATTR_FILES}:	$$@.txt
81	$(CP) $@.txt ${TMPDIR}/$@
82	> $@
83	$(ECHO) ${TMPDIR}/$@ $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
84	@$(RM) ${TMPDIR}/$@
85
86$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
87
88$(ETCSECURITY)/%: %
89	$(INS.file)
90
91$(ROOTETCSECURITY):
92	$(INS.dir)
93
94$(ROOTETCSECURITY)/%: %
95	$(INS.file)
96
97$(ROOTETC)/% : %
98	$(INS.file)
99
100$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
101
102$(INSTALL_DIR):
103	$(INS.dir)
104
105$(CLASS_SCR_DIR):
106	$(INS.dir)
107
108$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
109	$(INS.file)
110
111clobber clean:
112	$(RM) $(ATTR_FILES)
113
114$(SUBDIRS):	FRC
115	@cd $@; pwd; $(MAKE) $(TARGET)
116
117FRC:
118