2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A#
2N/A# Copyright (c) 1992, 2012, Oracle and/or its affiliates. All rights reserved.
2N/A#
2N/A
2N/Ainclude ../Makefile.lib
2N/A
2N/ASUBDIRS = $(MACH)
2N/A$(BUILD64)SUBDIRS += $(MACH64)
2N/A
2N/AXGETFLAGS_ADT += -a
2N/A
2N/Aall := TARGET= all
2N/Aclean := TARGET= clean
2N/Aclobber := TARGET= clobber
2N/Ainstall := TARGET= install
2N/Alint := TARGET= lint
2N/Apackage := TARGET= package
2N/Astub := TARGET = stub
2N/Astubinstall := TARGET = stubinstall
2N/A
2N/A.KEEP_STATE:
2N/A
2N/ACOMMONDIR = common
2N/A
2N/A#
2N/A# Macros for libbsm header files. These define user-level only interfaces.
2N/A#
2N/AGEN_EVENT_H = audit_uevents.h
2N/AGEN_XML_C = adt_xlate.c
2N/AGEN_XML_H = adt_event.h
2N/AGENHDRS = $(GEN_XML_H) $(GEN_EVENT_H)
2N/AGENSRCS = $(GEN_XML_C)
2N/AGENFILES = $(GENSRCS:%=$(COMMONDIR)/%) $(GENHDRS:%=$(COMMONDIR)/%)
2N/AHDRS = libbsm.h adt.h audit_private.h $(GENHDRS)
2N/ACOMMONHDRS = $(HDRS:%=$(COMMONDIR)/%)
2N/AROOTHDRDIR = $(ROOT)/usr/include/bsm
2N/AROOTHDRS = $(HDRS:%=$(ROOTHDRDIR)/%)
2N/ACHECKCHDRS = $(COMMONHDRS:%.h=%.check)
2N/A$(ROOTHDRS) := FILEMODE = 0644
2N/A
2N/Aall install lint: $(GENFILES) $(SUBDIRS)
2N/Aclean clobber stub stubinstall: $(SUBDIRS)
2N/A
2N/A#
2N/A# Macros for libbsm database files. These should probably be installed
2N/A# from somewhere else. Until we find that better place, install them
2N/A# from here.
2N/A#
2N/A
2N/AROOTETCSECURITY = $(ROOT)/etc/security
2N/A$(ROOTETCSECURITY) := DIRMODE = 0755
2N/A
2N/AESFILES = audit_class audit_event
2N/AESSRC = $(ESFILES:%=%.txt)
2N/AROOTETCSECURITYFILES = $(ESFILES:%=$(ROOTETCSECURITY)/%)
2N/A$(ROOTETCSECURITYFILES) := FILEMODE = 0644
2N/A
2N/AVARAUDIT=$(ROOT)/var/.migrate/audit
2N/A$(VARAUDIT) := DIRMODE = 0755
2N/A
2N/A#
2N/A# message catalogue file
2N/A#
2N/AMSGFILES = `$(GREP) -l gettext $(COMMONDIR)/*.c`
2N/APOFILE = libbsm.po
2N/A
2N/A#
2N/A# Definitions for XML (DTD AND XSL)
2N/A#
2N/ADTD = adt_record.dtd.1
2N/AXSL = adt_record.xsl.1
2N/AROOTXMLDIR = $(ROOT)/usr/share/lib/xml
2N/AROOTDTDDIR= $(ROOTXMLDIR)/dtd
2N/AROOTXSLDIR= $(ROOTXMLDIR)/style
2N/AROOTDTD= $(DTD:%=$(ROOTDTDDIR)/%)
2N/AROOTXSL= $(XSL:%=$(ROOTXSLDIR)/%)
2N/AROOTXMLDIRS = $(ROOTXMLDIR) $(ROOTDTDDIR) $(ROOTXSLDIR)
2N/AROOTXMLFILES = $(ROOTDTD) $(ROOTXSL)
2N/A$(ROOTXMLDIRS) := DIRMODE = 0755
2N/A$(ROOTXMLFILES) := FILEMODE = 0444
2N/A
2N/ACPPFLAGS += -I$(COMMONDIR)
2N/ACPPFLAGS += -D_REENTRANT
2N/A
2N/ACLEANFILES += $(GENFILES)
2N/A
2N/AADTXMLFILE = $(COMMONDIR)/adt.xml
2N/AADTXSDFILE = $(COMMONDIR)/adt.xsd
2N/AAVXMLFILE = av_matrix.xml
2N/AAVXSDFILE = av_matrix.xsd
2N/AAUDITXML = auditxml
2N/A
2N/A.KEEP_STATE:
2N/A
2N/Acheck: $(CHECKCHDRS)
2N/A xmllint --schema $(ADTXSDFILE) --noout $(ADTXMLFILE)
2N/A xmllint --schema $(AVXSDFILE) --noout $(AVXMLFILE)
2N/A
2N/Ainstall_h: $(ROOTHDRDIR) $(ROOTHDRS)
2N/A
2N/Ainstall: install_dirs install_data
2N/A
2N/Ainstall_data: $(ESSRC) $(ROOTETCSECURITYFILES) $(ROOTXMLFILES)
2N/A
2N/Ainstall_dirs: $(VARAUDIT) $(ROOTETCSECURITY) $(ROOTXMLDIRS)
2N/A
2N/A$(GEN_EVENT_H:%=$(COMMONDIR)/%): mkhdr.sh audit_event.txt
2N/A sh mkhdr.sh
2N/A
2N/A$(GEN_XML_H:%=$(COMMONDIR)/%) $(GEN_XML_C:%=$(COMMONDIR)/%): \
2N/A $(ADTXMLFILE) $(AUDITXML)
2N/A $(PERL) $(AUDITXML) -o $(COMMONDIR) $(ADTXMLFILE)
2N/A
2N/A$(ROOTHDRDIR):
2N/A $(INS.dir)
2N/A
2N/A$(ROOTHDRDIR)/%: $(COMMONDIR)/%
2N/A $(INS.file)
2N/A
2N/A$(ROOTXMLDIRS):
2N/A $(INS.dir)
2N/A
2N/A$(ROOTDTDDIR)/% $(ROOTXSLDIR)/%: %
2N/A $(INS.file)
2N/A
2N/A$(VARAUDIT):
2N/A $(INS.dir)
2N/A
2N/A$(ROOTETCSECURITY):
2N/A $(INS.dir)
2N/A
2N/A$(ROOTETCSECURITY)/%: %.txt
2N/A $(INS.rename)
2N/A
2N/A$(POFILE): pofile_MSGFILES
2N/A
2N/A_msg: $(MSGDOMAINPOFILE)
2N/A
2N/A# has strings but doesn't use gettext
2N/Aadt_xlate.po: $(COMMONDIR)/adt_xlate.c
2N/A $(RM) adt_xlate.po
2N/A $(XGETTEXT) $(XGETFLAGS_ADT) $(COMMONDIR)/adt_xlate.c
2N/A $(SED) "/^domain/d" < messages.po > adt_xlate.po
2N/A $(RM) messages.po
2N/A
2N/A$(SUBDIRS): FRC
2N/A @cd $@; pwd; $(MAKE) $(TARGET)
2N/A
2N/AFRC:
2N/A
2N/Ainclude ../Makefile.targ
2N/Ainclude ../../Makefile.msg.targ