getconf: don't include xpg4 bits, gcc7 includes xpg6 bits for us
[unleashed.git] / usr / src / lib / libbsm / Makefile
blob3f287638db0a3be8ca08e45c5e21974e1a57701f
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 (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
25 include ../Makefile.lib
27 SUBDIRS = $(MACH)
28 $(BUILD64)SUBDIRS += $(MACH64)
30 XGETFLAGS_ADT += -a
32 all := TARGET= all
33 clean := TARGET= clean
34 clobber := TARGET= clobber
35 delete := TARGET= delete
36 install := TARGET= install
37 package := TARGET= package
39 .KEEP_STATE:
41 COMMONDIR = common
44 # Macros for libbsm header files. These define user-level only interfaces.
46 GENHDRS = audit_uevents.h
47 HDRS = libbsm.h devices.h devalloc.h adt.h adt_event.h audit_private.h
48 GENSRCS = $(COMMONDIR)/adt_xlate.c $(COMMONDIR)/adt_event.h
49 COMMONHDRS = $(HDRS:%=$(COMMONDIR)/%)
50 ROOTHDRDIR = $(ROOT)/usr/include/bsm
51 ROOTCHDRS = $(HDRS:%=$(ROOTHDRDIR)/%)
52 ROOTHDRS = $(GENHDRS:%=$(ROOTHDRDIR)/%)
54 CHECKCHDRS = $(COMMONHDRS:%.h=%.check)
55 CHECKHDRS = $(GENHDRS:%.h=%.check)
57 $(ROOTHDRS) := FILEMODE = 0644
58 $(ROOTCHDRS) := FILEMODE = 0644
60 all install package: $(GENSRCS) $(SUBDIRS)
61 clean clobber delete: $(SUBDIRS)
64 # Macros for libbsm database files. These should probably be installed
65 # from somewhere else. Until we find that better place, install them
66 # from here.
69 ROOTETCSECURITY = $(ROOT)/etc/security
70 $(ROOTETCSECURITY) := DIRMODE = 0755
72 ESFILES = audit_class audit_event
73 ESSRC = $(ESFILES:%=%.txt)
74 ETCSECURITYFILES = $(ESFILES:%=$(ROOTETCSECURITY)/%)
75 $(ETCSECURITYFILES) := FILEMODE = 0644
78 # /etc/security/audit/localhost/files is a symbolic link to /var/audit.
79 # This is provided so that auditreduce will work in the default configuration.
81 RESA=$(ROOTETCSECURITY)/audit
82 RESAL=$(RESA)/localhost
83 VARAUDIT=$(ROOT)/var/audit
84 AUDITDIRS=$(RESA) $(RESAL) $(VARAUDIT)
85 $(AUDITDIRS) := FILEMODE = 0750
87 ARSYMLNK=$(RESAL)/files
90 # message catalogue file
92 MSGFILES = `$(GREP) -l gettext $(COMMONDIR)/*.c`
93 POFILE = libbsm.po
96 # Definitions for XML (DTD AND XSL)
98 DTD = adt_record.dtd.1
99 XSL = adt_record.xsl.1
100 ROOTXMLDIR = $(ROOT)/usr/share/lib/xml
101 ROOTDTDDIR= $(ROOTXMLDIR)/dtd
102 ROOTXSLDIR= $(ROOTXMLDIR)/style
103 ROOTDTD= $(DTD:%=$(ROOTDTDDIR)/%)
104 ROOTXSL= $(XSL:%=$(ROOTXSLDIR)/%)
105 ROOTXMLDIRS = $(ROOTXMLDIR) $(ROOTDTDDIR) $(ROOTXSLDIR)
106 ROOTXMLFILES = $(ROOTDTD) $(ROOTXSL)
108 $(ROOTXMLDIRS) := FILEMODE = 755
110 $(ROOTXMLFILES) := FILEMODE = 444
113 CPPFLAGS += -I$(COMMONDIR)
115 CLEANFILES += $(GENSRCS) $(GENHDRS)
117 ADTXMLFILE = $(COMMONDIR)/adt.xml
118 ADTXSDFILE = $(COMMONDIR)/adt.xsd
119 AUDITXML = auditxml
121 .KEEP_STATE:
123 install: install_dirs install_data
125 # $(ROOTUSRLIB) $(ROOTLIBS) $(ROOTLINKS)
127 install_h: $(ROOTHDRDIR) $(ROOTHDRS) $(ROOTCHDRS)
129 check:
131 install_data: $(ESSRC) $(RESSRC) $(ROOTETCSECURITY) $(ETCSECURITYFILES) \
132 $(ROOTXMLFILES)
134 install_dirs: $(AUDITDIRS) $(ARSYMLNK) $(ROOTXMLDIRS)
136 audit_uevents.h: mkhdr.sh audit_event.txt
137 sh mkhdr.sh
139 $(COMMONDIR)/adt_event.check: $(COMMONDIR)/adt_event.h
140 $(DOT_C_CHECK) $<
142 clean clobber: clean_files
144 clean_files:
145 -$(RM) $(CLEANFILES)
147 $(GENSRCS): $(ADTXMLFILE) $(AUDITXML)
148 $(PERL) -I. $(AUDITXML) -o $(COMMONDIR) $(ADTXMLFILE)
150 $(ETCSECURITYFILES) $(RESA): \
151 $(ETCSECURITY) \
152 $(ROOTETCSECURITY)
154 $(RESAL): $(RESA)
156 $(ARSYMLNK): $(RESAL)
158 $(ROOTHDRDIR):
159 $(INS.dir)
161 $(ROOTHDRDIR)/%:%
162 $(INS.file)
164 $(ROOTHDRDIR)/%:$(COMMONDIR)/%
165 $(INS.file)
167 $(ROOTXMLDIRS):
168 $(INS.dir)
170 $(ROOTDTDDIR)/% $(ROOTXSLDIR)/%: %
171 $(INS.file)
173 $(AUDITDIRS):
174 $(INS.dir)
176 $(ARSYMLNK):
177 $(RM) $@
178 $(SYMLINK) ../../../../var/audit $@
180 $(ETCSECURITY)/%: %.txt
181 $(INS.rename)
183 $(ROOTETCSECURITY):
184 $(INS.dir)
186 $(ROOTETCSECURITY)/%: %.txt
187 $(INS.rename)
189 $(POFILE): pofile_MSGFILES
191 _msg: $(MSGDOMAINPOFILE)
193 # has strings but doesn't use gettext
194 adt_xlate.po: $(COMMONDIR)/adt_xlate.c
195 $(RM) adt_xlate.po
196 $(XGETTEXT) $(XGETFLAGS_ADT) $(COMMONDIR)/adt_xlate.c
197 $(SED) "/^domain/d" < messages.po > adt_xlate.po
198 $(RM) messages.po
200 $(SUBDIRS): FRC
201 @cd $@; pwd; $(MAKE) $(TARGET)
203 FRC:
205 include ../Makefile.targ
206 include ../../Makefile.msg.targ