xref: /illumos-gate/usr/src/cmd/auditd/Makefile (revision 8523fda3525b37e02f4d11efc8cf763bf08204ec)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5a192e900Samaguire# Common Development and Distribution License (the "License").
6a192e900Samaguire# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*8523fda3SJan Friedel# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gatePROG = auditd
277c478bd9Sstevel@tonic-gate
28a192e900SamaguireMANIFEST = auditd.xml
29a192e900SamaguireSVCMETHOD = svc-auditd
30a192e900Samaguire
31*8523fda3SJan Friedelinclude $(SRC)/cmd/Makefile.cmd
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateLIBBSM = $(SRC)/lib/libbsm/common
36*8523fda3SJan FriedelAUDITCONFIG = $(SRC)/cmd/auditconfig
37*8523fda3SJan FriedelAUDITD = $(SRC)/cmd/auditd
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateCPPFLAGS += -D_REENTRANT
40*8523fda3SJan FriedelCPPFLAGS += -I$(LIBBSM) -I$(AUDITCONFIG) -I$(AUDITD)
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gateLINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
437c478bd9Sstevel@tonic-gateLINTFLAGS += -m
447c478bd9Sstevel@tonic-gate
45*8523fda3SJan FriedelLDLIBS += -lbsm -lsecdb -lscf
467c478bd9Sstevel@tonic-gate
47*8523fda3SJan FriedelOBJS = audit_scf_shared.o auditd.o doorway.o queue.o
48*8523fda3SJan FriedelSRCS = $(AUDITCONFIG)/audit_scf_shared.c auditd.c doorway.c queue.c
49*8523fda3SJan Friedel
50*8523fda3SJan FriedelPOFILE =	auditd.po
51*8523fda3SJan FriedelMSGFILES =	$(SRCS)
52*8523fda3SJan Friedel
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gate.KEEP_STATE:
557c478bd9Sstevel@tonic-gate
56a192e900Samaguireall:		$(PROG)
577c478bd9Sstevel@tonic-gate
58a192e900Samaguireinstall:	all $(ROOTUSRSBINPROG) \
59a192e900Samaguire		$(ROOTMANIFEST) $(ROOTSVCMETHOD)
607c478bd9Sstevel@tonic-gate
61*8523fda3SJan Friedel$(PROG):	$(SRCS) $(OBJS)
627c478bd9Sstevel@tonic-gate		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
637c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
647c478bd9Sstevel@tonic-gate
65*8523fda3SJan Friedelaudit_scf%.o:
66*8523fda3SJan Friedel		$(COMPILE.c) $(AUDITCONFIG)/$(@:%.o=%.c)
67*8523fda3SJan Friedel
687c478bd9Sstevel@tonic-gatelint:		lint_SRCS
697c478bd9Sstevel@tonic-gate
70*8523fda3SJan Friedel$(POFILE): $(MSGFILES)
71*8523fda3SJan Friedel		$(BUILDPO.msgfiles)
72*8523fda3SJan Friedel
73*8523fda3SJan Friedel#_msg: $(MSGDOMAINPOFILE)
74*8523fda3SJan Friedel
75a192e900Samaguireclean:
76a192e900Samaguire		$(RM) $(OBJS)
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gatecheck:		$(CHKMANIFEST)
797c478bd9Sstevel@tonic-gate
80*8523fda3SJan Friedelinclude $(SRC)/cmd/Makefile.targ
81*8523fda3SJan Friedel#include $(SRC)/Makefile.msg.targ
82*8523fda3SJan FriedelBUILDPO.msgfiles = \
83*8523fda3SJan Friedel	$(RM) messages.po $(TEXT_DOMAIN).po; \
84*8523fda3SJan Friedel	$(TOUCH) $(TEXT_DOMAIN).po; \
85*8523fda3SJan Friedel	$(XGETTEXT) $(XGETFLAGS) $(MSGFILES); \
86*8523fda3SJan Friedel	$(SED) -e '/^\# msgid/,/^\# msgstr/d' -e '/^domain/d' \
87*8523fda3SJan Friedel	-e '/^\#$$/d' -e '/^\#, /d' \
88*8523fda3SJan Friedel	messages.po $(TEXT_DOMAIN).po > $(POFILE); \
89*8523fda3SJan Friedel	$(RM) messages.po $(TEXT_DOMAIN).po
90