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
38 package
:= TARGET
= package
45 # Macros for libbsm header files. These define user-level only interfaces.
47 GENHDRS
= audit_uevents.h
48 HDRS
= libbsm.h devices.h devalloc.h adt.h adt_event.h audit_private.h
49 GENSRCS
= $(COMMONDIR
)/adt_xlate.c
$(COMMONDIR
)/adt_event.h
50 COMMONHDRS
= $(HDRS
:%=$(COMMONDIR
)/%)
51 ROOTHDRDIR
= $(ROOT
)/usr
/include/bsm
52 ROOTCHDRS
= $(HDRS
:%=$(ROOTHDRDIR
)/%)
53 ROOTHDRS
= $(GENHDRS
:%=$(ROOTHDRDIR
)/%)
55 CHECKCHDRS
= $(COMMONHDRS
:%.h
=%.
check)
56 CHECKHDRS
= $(GENHDRS
:%.h
=%.
check)
58 $(ROOTHDRS
) := FILEMODE
= 0644
59 $(ROOTCHDRS
) := FILEMODE
= 0644
61 all install lint package
: $(GENSRCS
) $(SUBDIRS
)
62 clean clobber delete
: $(SUBDIRS
)
65 # Macros for libbsm database files. These should probably be installed
66 # from somewhere else. Until we find that better place, install them
70 ROOTETCSECURITY
= $(ROOT
)/etc
/security
71 $(ROOTETCSECURITY
) := DIRMODE
= 0755
73 ESFILES
= audit_class audit_event
74 ESSRC
= $(ESFILES
:%=%.txt
)
75 ETCSECURITYFILES
= $(ESFILES
:%=$(ROOTETCSECURITY
)/%)
76 $(ETCSECURITYFILES
) := FILEMODE
= 0644
79 # /etc/security/audit/localhost/files is a symbolic link to /var/audit.
80 # This is provided so that auditreduce will work in the default configuration.
82 RESA
=$(ROOTETCSECURITY
)/audit
83 RESAL
=$(RESA
)/localhost
84 VARAUDIT
=$(ROOT
)/var
/audit
85 AUDITDIRS
=$(RESA
) $(RESAL
) $(VARAUDIT
)
86 $(AUDITDIRS
) := FILEMODE
= 0750
88 ARSYMLNK
=$(RESAL
)/files
91 # message catalogue file
93 MSGFILES
= `$(GREP) -l gettext $(COMMONDIR)/*.c`
97 # Definitions for XML (DTD AND XSL)
99 DTD
= adt_record.dtd
.1
100 XSL
= adt_record.xsl
.1
101 ROOTXMLDIR
= $(ROOT
)/usr
/share
/lib
/xml
102 ROOTDTDDIR
= $(ROOTXMLDIR
)/dtd
103 ROOTXSLDIR
= $(ROOTXMLDIR
)/style
104 ROOTDTD
= $(DTD
:%=$(ROOTDTDDIR
)/%)
105 ROOTXSL
= $(XSL
:%=$(ROOTXSLDIR
)/%)
106 ROOTXMLDIRS
= $(ROOTXMLDIR
) $(ROOTDTDDIR
) $(ROOTXSLDIR
)
107 ROOTXMLFILES
= $(ROOTDTD
) $(ROOTXSL
)
109 $(ROOTXMLDIRS
) := FILEMODE
= 755
111 $(ROOTXMLFILES
) := FILEMODE
= 444
114 CPPFLAGS
+= -I
$(COMMONDIR
)
115 CPPFLAGS
+= -D_REENTRANT
117 CLEANFILES
+= $(GENSRCS
) $(GENHDRS
)
119 ADTXMLFILE
= $(COMMONDIR
)/adt.xml
120 ADTXSDFILE
= $(COMMONDIR
)/adt.xsd
125 install: install_dirs
install_data
127 # $(ROOTUSRLIB) $(ROOTLIBS) $(ROOTLINKS)
129 install_h
: $(ROOTHDRDIR
) $(ROOTHDRS
) $(ROOTCHDRS
)
131 check: $(CHECKHDRS
) $(CHECKCHDRS
)
132 xmllint
--schema
$(ADTXSDFILE
) --noout
$(ADTXMLFILE
)
134 install_data: $(ESSRC
) $(RESSRC
) $(ROOTETCSECURITY
) $(ETCSECURITYFILES
) \
137 install_dirs
: $(AUDITDIRS
) $(ARSYMLNK
) $(ROOTXMLDIRS
)
139 audit_uevents.h
: mkhdr.sh audit_event.txt
142 $(COMMONDIR
)/adt_event.
check: $(COMMONDIR
)/adt_event.h
145 clean clobber: clean_files
150 $(GENSRCS
): $(ADTXMLFILE
) $(AUDITXML
)
151 $(PERL
) $(AUDITXML
) -o
$(COMMONDIR
) $(ADTXMLFILE
)
153 $(ETCSECURITYFILES
) $(RESA
): \
159 $(ARSYMLNK
): $(RESAL
)
167 $(ROOTHDRDIR
)/%:$(COMMONDIR
)/%
173 $(ROOTDTDDIR
)/% $(ROOTXSLDIR
)/%: %
181 $(SYMLINK
) ..
/..
/..
/..
/var
/audit
$@
183 $(ETCSECURITY
)/%: %.txt
189 $(ROOTETCSECURITY
)/%: %.txt
192 $(POFILE
): pofile_MSGFILES
194 _msg
: $(MSGDOMAINPOFILE
)
196 # has strings but doesn't use gettext
197 adt_xlate.po
: $(COMMONDIR
)/adt_xlate.c
199 $(XGETTEXT
) $(XGETFLAGS_ADT
) $(COMMONDIR
)/adt_xlate.c
200 $(SED
) "/^domain/d" < messages.po
> adt_xlate.po
204 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)
208 include ..
/Makefile.targ
209 include ..
/..
/Makefile.msg.targ