xref: /illumos-gate/usr/src/cmd/auditrecord/Makefile (revision 55fea89dcaa64928bed4327112404dcb3e07b79f)
1cf9691b9Sgww#
2cf9691b9Sgww# CDDL HEADER START
3cf9691b9Sgww#
4cf9691b9Sgww# The contents of this file are subject to the terms of the
5cf9691b9Sgww# Common Development and Distribution License (the "License").
6cf9691b9Sgww# You may not use this file except in compliance with the License.
7cf9691b9Sgww#
8cf9691b9Sgww# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9cf9691b9Sgww# or http://www.opensolaris.org/os/licensing.
10cf9691b9Sgww# See the License for the specific language governing permissions
11cf9691b9Sgww# and limitations under the License.
12cf9691b9Sgww#
13cf9691b9Sgww# When distributing Covered Code, include this CDDL HEADER in each
14cf9691b9Sgww# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15cf9691b9Sgww# If applicable, add the following below this CDDL HEADER, with the
16cf9691b9Sgww# fields enclosed by brackets "[]" replaced with your own identifying
17cf9691b9Sgww# information: Portions Copyright [yyyy] [name of copyright owner]
18cf9691b9Sgww#
19cf9691b9Sgww# CDDL HEADER END
20cf9691b9Sgww#
21cf9691b9Sgww#
22*1eea4119SJan Friedel# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
23cf9691b9Sgww# Use is subject to license terms.
24cf9691b9Sgww#
25cf9691b9Sgww
26*1eea4119SJan Friedelinclude $(SRC)/cmd/Makefile.cmd
27cf9691b9Sgww
28cf9691b9SgwwATTR =			audit_record_attr
29cf9691b9SgwwROOTAUDITDIR =		$(ROOT)/usr/lib/audit
30cf9691b9Sgww
31cf9691b9SgwwSECURITYFILES = 	$(ATTR:%=$(ROOTAUDITDIR)/%)
32cf9691b9Sgww$(SECURITYFILES) :=	FILEMODE = $(LIBFILEMODE)
33cf9691b9Sgww
34cf9691b9SgwwPROG		= auditrecord
35cf9691b9Sgww
36cf9691b9SgwwAGETTEXT	= mkmsg
37cf9691b9SgwwSTRIPTEXT	= filter_txt
38cf9691b9SgwwATTRPROC	= audit_record_xml
39*1eea4119SJan FriedelLIBBSMDIR	= $(SRC)/lib/libbsm
40cf9691b9SgwwADTXMLFILE	= $(LIBBSMDIR)/common/adt.xml
41cf9691b9Sgww
42cf9691b9Sgww.KEEP_STATE:
43cf9691b9Sgww
44cf9691b9Sgwwall: $(PROG) $(ATTR)
45cf9691b9Sgww
46cf9691b9Sgwwinstall: all $(ROOTUSRSBINPROG) install_data
47cf9691b9Sgww
48cf9691b9Sgwwinstall_data: $(SECURITYFILES) $(ATTR)
49cf9691b9Sgww
50cf9691b9Sgww$(SECURITYFILES): $(ROOTAUDITDIR) $(ATTR)
51cf9691b9Sgww	$(INS.file) $(ATTR)
52cf9691b9Sgww
53cf9691b9Sgww$(ROOTAUDITDIR):
54cf9691b9Sgww	$(INS.dir)
55cf9691b9Sgww
56cf9691b9Sgww_msg: $(PROG).po
57cf9691b9Sgww
58cf9691b9Sgwwclean:
59*1eea4119SJan Friedel	$(RM) $(ATTR) $(STRIPTEXT) $(AGETTEXT)
60cf9691b9Sgww
61cf9691b9Sgww$(ATTR): $(STRIPTEXT) $(ATTRPROC) $(ADTXMLFILE) $(ATTR).txt
62cf9691b9Sgww	./$(STRIPTEXT) < $(ATTR).txt > $(ATTR)
63cf9691b9Sgww	$(PERL) -I $(LIBBSMDIR) ./$(ATTRPROC) $(ADTXMLFILE) >> $(ATTR)
64cf9691b9Sgww
65cf9691b9Sgww$(ROOTUSRSBINPROG): $(PROG)
66cf9691b9Sgww	$(INS.file) $(PROG)
67cf9691b9Sgww
68cf9691b9Sgww$(PROG).po: $(PROG) $(ATTR) $(AGETTEXT)
69cf9691b9Sgww	export PERL5LIB; PERL5LIB=../perl/contrib; \
70cf9691b9Sgww	./$(AGETTEXT) $(TEXT_DOMAIN) $(PROG).po; \
71cf9691b9Sgww	$(XGETTEXT) -d $(PROG) -j $(PROG)
72cf9691b9Sgww
73cf9691b9Sgwwlint:
74cf9691b9Sgww
75*1eea4119SJan Friedelinclude $(SRC)/cmd/Makefile.targ
76