6811333 Remove prom_printf() message in emlxs driver
[opensolaris.git] / usr / src / lib / libbsm / Makefile
blobe746b86cd0d4e2e5bc9ef2c8733162c0871b7f18
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 include ../Makefile.lib
28 SUBDIRS = $(MACH)
29 $(BUILD64)SUBDIRS += $(MACH64)
31 XGETFLAGS_ADT += -a
33 all := TARGET= all
34 clean := TARGET= clean
35 clobber := TARGET= clobber
36 delete := TARGET= delete
37 install := TARGET= install
38 lint := TARGET= lint
39 package := TARGET= package
41 .KEEP_STATE:
43 COMMONDIR = common
46 # Macros for libbsm header files. These define user-level only interfaces.
48 GENHDRS = audit_uevents.h
49 HDRS = libbsm.h devices.h devalloc.h adt.h adt_event.h audit_private.h
50 GENSRCS = $(COMMONDIR)/adt_xlate.c $(COMMONDIR)/adt_event.h
51 COMMONHDRS = $(HDRS:%=$(COMMONDIR)/%)
52 ROOTHDRDIR = $(ROOT)/usr/include/bsm
53 ROOTCHDRS = $(HDRS:%=$(ROOTHDRDIR)/%)
54 ROOTHDRS = $(GENHDRS:%=$(ROOTHDRDIR)/%)
56 CHECKCHDRS = $(COMMONHDRS:%.h=%.check)
57 CHECKHDRS = $(GENHDRS:%.h=%.check)
59 $(ROOTHDRS) := FILEMODE = 0644
60 $(ROOTCHDRS) := FILEMODE = 0644
62 all install lint package: $(GENSRCS) $(SUBDIRS)
63 clean clobber delete: $(SUBDIRS)
66 # Macros for libbsm database files. These should probably be installed
67 # from somewhere else. Until we find that better place, install them
68 # from here.
71 ROOTETCSECURITY = $(ROOT)/etc/security
72 $(ROOTETCSECURITY) := DIRMODE = 0755
73 $(ROOTETCSECURITY) := OWNER = root
74 $(ROOTETCSECURITY) := GROUP = sys
76 ESFILES = audit_class audit_control audit_event audit_user
77 ESSRC = $(ESFILES:%=%.txt)
78 ETCSECURITYFILES = $(ESFILES:%=$(ROOTETCSECURITY)/%)
79 $(ETCSECURITYFILES) := FILEMODE = 0644
80 $(ETCSECURITYFILES) := OWNER = root
81 $(ETCSECURITYFILES) := GROUP = sys
83 EESFILES = audit_startup
84 EESSRC = $(EESFILES:%=%.txt)
85 EETCSECURITYFILES = $(EESFILES:%=$(ROOTETCSECURITY)/%)
86 $(EETCSECURITYFILES) := FILEMODE = 0744
87 $(EETCSECURITYFILES) := OWNER = root
88 $(EETCSECURITYFILES) := GROUP = sys
91 # /etc/security/audit/localhost/files is a symbolic link to /var/audit.
92 # This is provided so that auditreduce will work in the default configuration.
94 RESA=$(ROOTETCSECURITY)/audit
95 RESAL=$(RESA)/localhost
96 VARAUDIT=$(ROOT)/var/audit
97 AUDITDIRS=$(RESA) $(RESAL) $(VARAUDIT)
98 $(AUDITDIRS) := FILEMODE = 0750
99 $(AUDITDIRS) := OWNER = root
100 $(AUDITDIRS) := GROUP = sys
102 ARSYMLNK=$(RESAL)/files
105 # message catalogue file
107 MSGFILES = `$(GREP) -l gettext $(COMMONDIR)/*.c`
108 POFILE = libbsm.po
111 # Definitions for XML (DTD AND XSL)
113 DTD = adt_record.dtd.1
114 XSL = adt_record.xsl.1
115 ROOTXMLDIR = $(ROOT)/usr/share/lib/xml
116 ROOTDTDDIR= $(ROOTXMLDIR)/dtd
117 ROOTXSLDIR= $(ROOTXMLDIR)/style
118 ROOTDTD= $(DTD:%=$(ROOTDTDDIR)/%)
119 ROOTXSL= $(XSL:%=$(ROOTXSLDIR)/%)
120 ROOTXMLDIRS = $(ROOTXMLDIR) $(ROOTDTDDIR) $(ROOTXSLDIR)
121 ROOTXMLFILES = $(ROOTDTD) $(ROOTXSL)
123 $(ROOTXMLDIRS) := FILEMODE = 755
124 $(ROOTXMLDIRS) := OWNER = root
125 $(ROOTXMLDIRS) := GROUP = sys
127 $(ROOTXMLFILES) := FILEMODE = 444
128 $(ROOTXMLFILES) := OWNER = root
129 $(ROOTXMLFILES) := GROUP = bin
132 CPPFLAGS += -I$(COMMONDIR)
133 CPPFLAGS += -D_REENTRANT
135 CLEANFILES += $(GENSRCS) $(GENHDRS)
137 ADTXMLFILE = $(COMMONDIR)/adt.xml
138 ADTXSDFILE = $(COMMONDIR)/adt.xsd
139 AUDITXML = auditxml
141 .KEEP_STATE:
143 install: install_dirs install_data
145 # $(ROOTUSRLIB) $(ROOTLIBS) $(ROOTLINKS)
147 install_h: $(ROOTHDRDIR) $(ROOTHDRS) $(ROOTCHDRS)
149 check: $(CHECKHDRS) $(CHECKCHDRS)
150 xmllint --schema $(ADTXSDFILE) --noout $(ADTXMLFILE)
152 install_data: $(ESSRC) $(RESSRC) $(ROOTETCSECURITY) $(ETCSECURITYFILES) \
153 $(EETCSECURITYFILES) $(ROOTXMLFILES)
155 install_dirs: $(AUDITDIRS) $(ARSYMLNK) $(ROOTXMLDIRS)
157 audit_uevents.h: mkhdr.sh audit_event.txt
158 sh mkhdr.sh
160 $(COMMONDIR)/adt_event.check: $(COMMONDIR)/adt_event.h
161 $(DOT_C_CHECK) $<
163 clean clobber: clean_files
165 clean_files:
166 -$(RM) $(CLEANFILES)
168 $(GENSRCS): $(ADTXMLFILE) $(AUDITXML)
169 $(PERL) $(AUDITXML) -o $(COMMONDIR) $(ADTXMLFILE)
171 $(ETCSECURITYFILES) $(EETCSECURITYFILES) $(RESA): \
172 $(ETCSECURITY) \
173 $(ROOTETCSECURITY)
175 $(RESAL): $(RESA)
177 $(ARSYMLNK): $(RESAL)
179 $(ROOTHDRDIR):
180 $(INS.dir)
182 $(ROOTHDRDIR)/%:%
183 $(INS.file)
185 $(ROOTHDRDIR)/%:$(COMMONDIR)/%
186 $(INS.file)
188 $(ROOTXMLDIRS):
189 $(INS.dir)
191 $(ROOTDTDDIR)/% $(ROOTXSLDIR)/%: %
192 $(INS.file)
194 $(AUDITDIRS):
195 $(INS.dir)
197 $(ARSYMLNK):
198 $(RM) $@
199 $(SYMLINK) ../../../../var/audit $@
201 $(ETCSECURITY)/%: %.txt
202 $(INS.rename)
204 $(ROOTETCSECURITY):
205 $(INS.dir)
207 $(ROOTETCSECURITY)/%: %.txt
208 $(INS.rename)
210 $(POFILE): pofile_MSGFILES
212 _msg: $(MSGDOMAINPOFILE)
214 # has strings but doesn't use gettext
215 adt_xlate.po: $(COMMONDIR)/adt_xlate.c
216 $(RM) adt_xlate.po
217 $(XGETTEXT) $(XGETFLAGS_ADT) $(COMMONDIR)/adt_xlate.c
218 $(SED) "/^domain/d" < messages.po > adt_xlate.po
219 $(RM) messages.po
221 $(SUBDIRS): FRC
222 @cd $@; pwd; $(MAKE) $(TARGET)
224 FRC:
226 include ../Makefile.targ
227 include ../../Makefile.msg.targ