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]
22 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
25 include ..
/Makefile.lib
28 $(BUILD64
)SUBDIRS
+= $(MACH64
)
33 clean := TARGET
= clean
34 clobber := TARGET
= clobber
35 delete
:= TARGET
= delete
36 install := TARGET
= install
37 package
:= TARGET
= package
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
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`
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
123 install: install_dirs
install_data
125 # $(ROOTUSRLIB) $(ROOTLIBS) $(ROOTLINKS)
127 install_h
: $(ROOTHDRDIR
) $(ROOTHDRS
) $(ROOTCHDRS
)
129 check: $(CHECKHDRS
) $(CHECKCHDRS
)
130 xmllint
--schema
$(ADTXSDFILE
) --noout
$(ADTXMLFILE
)
132 install_data: $(ESSRC
) $(RESSRC
) $(ROOTETCSECURITY
) $(ETCSECURITYFILES
) \
135 install_dirs
: $(AUDITDIRS
) $(ARSYMLNK
) $(ROOTXMLDIRS
)
137 audit_uevents.h
: mkhdr.sh audit_event.txt
140 $(COMMONDIR
)/adt_event.
check: $(COMMONDIR
)/adt_event.h
143 clean clobber: clean_files
148 $(GENSRCS
): $(ADTXMLFILE
) $(AUDITXML
)
149 $(PERL
) $(AUDITXML
) -o
$(COMMONDIR
) $(ADTXMLFILE
)
151 $(ETCSECURITYFILES
) $(RESA
): \
157 $(ARSYMLNK
): $(RESAL
)
165 $(ROOTHDRDIR
)/%:$(COMMONDIR
)/%
171 $(ROOTDTDDIR
)/% $(ROOTXSLDIR
)/%: %
179 $(SYMLINK
) ..
/..
/..
/..
/var
/audit
$@
181 $(ETCSECURITY
)/%: %.txt
187 $(ROOTETCSECURITY
)/%: %.txt
190 $(POFILE
): pofile_MSGFILES
192 _msg
: $(MSGDOMAINPOFILE
)
194 # has strings but doesn't use gettext
195 adt_xlate.po
: $(COMMONDIR
)/adt_xlate.c
197 $(XGETTEXT
) $(XGETFLAGS_ADT
) $(COMMONDIR
)/adt_xlate.c
198 $(SED
) "/^domain/d" < messages.po
> adt_xlate.po
202 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)
206 include ..
/Makefile.targ
207 include ..
/..
/Makefile.msg.targ