Makefile revision f229d58b8d8b280c11d5ba6bf476acae7e8f03bd
0N/A#
2362N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
2362N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2362N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
2362N/A#
2362N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
2362N/A# Use is subject to license terms.
0N/A#
0N/A# ident "%Z%%M% %I% %E% SMI"
0N/A#
0N/A
0N/Ainclude ../Makefile.lib
0N/A
0N/ASUBDIRS = $(MACH)
0N/A$(BUILD64)SUBDIRS += $(MACH64)
0N/A
0N/AXGETFLAGS_ADT += -a
0N/A
0N/Aall := TARGET= all
0N/Aclean := TARGET= clean
0N/Aclobber := TARGET= clobber
0N/Adelete := TARGET= delete
0N/Ainstall := TARGET= install
0N/Alint := TARGET= lint
0N/Apackage := TARGET= package
0N/A
0N/A.KEEP_STATE:
0N/A
0N/Aall clean clobber delete install lint package: $(SUBDIRS)
0N/A
0N/ACOMMONDIR = common
0N/A
0N/A#
0N/A# Macros for libbsm header files. These define user-level only interfaces.
0N/A#
0N/AGENHDRS = audit_uevents.h
0N/AHDRS = libbsm.h devices.h devalloc.h adt.h adt_event.h audit_private.h
0N/ACOMMONHDRS = $(HDRS:%=$(COMMONDIR)/%)
0N/AROOTHDRDIR = $(ROOT)/usr/include/bsm
0N/AROOTCHDRS = $(HDRS:%=$(ROOTHDRDIR)/%)
0N/AROOTHDRS = $(GENHDRS:%=$(ROOTHDRDIR)/%)
0N/A
0N/ACHECKCHDRS = $(COMMONHDRS:%.h=%.check)
0N/ACHECKHDRS = $(GENHDRS:%.h=%.check)
0N/A
0N/A$(ROOTHDRS) := FILEMODE = 0644
0N/A$(ROOTCHDRS) := FILEMODE = 0644
0N/A
0N/A#
0N/A# Macros for libbsm database files. These should probably be installed
0N/A# from somewhere else. Until we find that better place, install them
0N/A# from here.
0N/A#
0N/A
0N/AROOTETCSECURITY = $(ROOT)/etc/security
0N/A$(ROOTETCSECURITY) := DIRMODE = 0755
0N/A$(ROOTETCSECURITY) := OWNER = root
0N/A$(ROOTETCSECURITY) := GROUP = sys
0N/A
0N/AESFILES = audit_class audit_control audit_event audit_user
0N/AESSRC = $(ESFILES:%=%.txt)
0N/AETCSECURITYFILES = $(ESFILES:%=$(ROOTETCSECURITY)/%)
0N/A$(ETCSECURITYFILES) := FILEMODE = 0644
0N/A$(ETCSECURITYFILES) := OWNER = root
0N/A$(ETCSECURITYFILES) := GROUP = sys
0N/A
0N/AEESFILES = audit_startup
0N/AEESSRC = $(EESFILES:%=%.txt)
0N/AEETCSECURITYFILES = $(EESFILES:%=$(ROOTETCSECURITY)/%)
0N/A$(EETCSECURITYFILES) := FILEMODE = 0744
0N/A$(EETCSECURITYFILES) := OWNER = root
$(EETCSECURITYFILES) := GROUP = sys
#
# /etc/security/audit/localhost/files is a symbolic link to /var/audit.
# This is provided so that auditreduce will work in the default configuration.
#
RESA=$(ROOTETCSECURITY)/audit
RESAL=$(RESA)/localhost
VARAUDIT=$(ROOT)/var/audit
AUDITDIRS=$(RESA) $(RESAL) $(VARAUDIT)
$(AUDITDIRS) := FILEMODE = 0750
$(AUDITDIRS) := OWNER = root
$(AUDITDIRS) := GROUP = sys
ARSYMLNK=$(RESAL)/files
#
# message catalogue file
#
MSGFILES = `$(GREP) -l gettext $(COMMONDIR)/*.c`
POFILE = libbsm.po
#
# Definitions for XML (DTD AND XSL)
#
DTD = adt_record.dtd.1
XSL = adt_record.xsl.1
ROOTXMLDIR = $(ROOT)/usr/share/lib/xml
ROOTDTDDIR= $(ROOTXMLDIR)/dtd
ROOTXSLDIR= $(ROOTXMLDIR)/style
ROOTDTD= $(DTD:%=$(ROOTDTDDIR)/%)
ROOTXSL= $(XSL:%=$(ROOTXSLDIR)/%)
ROOTXMLDIRS = $(ROOTXMLDIR) $(ROOTDTDDIR) $(ROOTXSLDIR)
ROOTXMLFILES = $(ROOTDTD) $(ROOTXSL)
$(ROOTXMLDIRS) := FILEMODE = 755
$(ROOTXMLDIRS) := OWNER = root
$(ROOTXMLDIRS) := GROUP = sys
$(ROOTXMLFILES) := FILEMODE = 444
$(ROOTXMLFILES) := OWNER = root
$(ROOTXMLFILES) := GROUP = bin
CPPFLAGS += -I$(COMMONDIR)
CPPFLAGS += -D_REENTRANT
.KEEP_STATE:
install: install_dirs install_data
# $(ROOTUSRLIB) $(ROOTLIBS) $(ROOTLINKS)
install_h: $(ROOTHDRDIR) $(ROOTHDRS) $(ROOTCHDRS)
check: $(CHECKHDRS) $(CHECKCHDRS)
install_data: $(ESSRC) $(RESSRC) $(ROOTETCSECURITY) $(ETCSECURITYFILES) \
$(EETCSECURITYFILES) $(ROOTXMLFILES)
install_dirs: $(AUDITDIRS) $(ARSYMLNK) $(ROOTXMLDIRS)
audit_uevents.h: mkhdr.sh audit_event.txt
sh mkhdr.sh
$(ETCSECURITYFILES) $(EETCSECURITYFILES) $(RESA): \
$(ETCSECURITY) \
$(ROOTETCSECURITY)
$(RESAL): $(RESA)
$(ARSYMLNK): $(RESAL)
$(ROOTHDRDIR):
$(INS.dir)
$(ROOTHDRDIR)/%:%
$(INS.file)
$(ROOTHDRDIR)/%:$(COMMONDIR)/%
$(INS.file)
$(ROOTXMLDIRS):
$(INS.dir)
$(ROOTDTDDIR)/% $(ROOTXSLDIR)/%: %
$(INS.file)
$(AUDITDIRS):
$(INS.dir)
$(ARSYMLNK):
$(RM) $@
$(SYMLINK) ../../../../var/audit $@
$(ETCSECURITY)/%: %.txt
$(INS.rename)
$(ROOTETCSECURITY):
$(INS.dir)
$(ROOTETCSECURITY)/%: %.txt
$(INS.rename)
$(POFILE): pofile_MSGFILES
_msg: $(MSGDOMAINPOFILE)
# has strings but doesn't use gettext
adt_xlate.po: $(COMMONDIR)/adt_xlate.c
$(RM) adt_xlate.po
$(XGETTEXT) $(XGETFLAGS_ADT) $(COMMONDIR)/adt_xlate.c
$(SED) "/^domain/d" < messages.po > adt_xlate.po
$(RM) messages.po
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
FRC:
include ../Makefile.targ
include ../../Makefile.msg.targ