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 52d84dfe8Sgww# Common Development and Distribution License (the "License"). 62d84dfe8Sgww# 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# 2207925104Sgww# Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. 237c478bd9Sstevel@tonic-gate# 247c478bd9Sstevel@tonic-gate 257c478bd9Sstevel@tonic-gateinclude ../Makefile.lib 267c478bd9Sstevel@tonic-gate 27f808c858SrafSUBDIRS = $(MACH) 28f808c858Sraf$(BUILD64)SUBDIRS += $(MACH64) 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gateXGETFLAGS_ADT += -a 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gateall := TARGET= all 337c478bd9Sstevel@tonic-gateclean := TARGET= clean 347c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 357c478bd9Sstevel@tonic-gatedelete := TARGET= delete 367c478bd9Sstevel@tonic-gateinstall := TARGET= install 377c478bd9Sstevel@tonic-gatelint := TARGET= lint 387c478bd9Sstevel@tonic-gatepackage := TARGET= package 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate.KEEP_STATE: 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gateCOMMONDIR = common 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate# 457c478bd9Sstevel@tonic-gate# Macros for libbsm header files. These define user-level only interfaces. 467c478bd9Sstevel@tonic-gate# 477c478bd9Sstevel@tonic-gateGENHDRS = audit_uevents.h 4845916cd2SjpkHDRS = libbsm.h devices.h devalloc.h adt.h adt_event.h audit_private.h 49c0c79a3fStz204579GENSRCS = $(COMMONDIR)/adt_xlate.c $(COMMONDIR)/adt_event.h 507c478bd9Sstevel@tonic-gateCOMMONHDRS = $(HDRS:%=$(COMMONDIR)/%) 517c478bd9Sstevel@tonic-gateROOTHDRDIR = $(ROOT)/usr/include/bsm 527c478bd9Sstevel@tonic-gateROOTCHDRS = $(HDRS:%=$(ROOTHDRDIR)/%) 537c478bd9Sstevel@tonic-gateROOTHDRS = $(GENHDRS:%=$(ROOTHDRDIR)/%) 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gateCHECKCHDRS = $(COMMONHDRS:%.h=%.check) 567c478bd9Sstevel@tonic-gateCHECKHDRS = $(GENHDRS:%.h=%.check) 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gate$(ROOTHDRS) := FILEMODE = 0644 597c478bd9Sstevel@tonic-gate$(ROOTCHDRS) := FILEMODE = 0644 607c478bd9Sstevel@tonic-gate 6138cb303eSjmcpall install lint package: $(GENSRCS) $(SUBDIRS) 62c0c79a3fStz204579clean clobber delete: $(SUBDIRS) 63c0c79a3fStz204579 647c478bd9Sstevel@tonic-gate# 657c478bd9Sstevel@tonic-gate# Macros for libbsm database files. These should probably be installed 667c478bd9Sstevel@tonic-gate# from somewhere else. Until we find that better place, install them 677c478bd9Sstevel@tonic-gate# from here. 687c478bd9Sstevel@tonic-gate# 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gateROOTETCSECURITY = $(ROOT)/etc/security 717c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY) := DIRMODE = 0755 727c478bd9Sstevel@tonic-gate 73f8994074SJan FriedelESFILES = audit_class audit_event 747c478bd9Sstevel@tonic-gateESSRC = $(ESFILES:%=%.txt) 757c478bd9Sstevel@tonic-gateETCSECURITYFILES = $(ESFILES:%=$(ROOTETCSECURITY)/%) 767c478bd9Sstevel@tonic-gate$(ETCSECURITYFILES) := FILEMODE = 0644 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate# 797c478bd9Sstevel@tonic-gate# /etc/security/audit/localhost/files is a symbolic link to /var/audit. 807c478bd9Sstevel@tonic-gate# This is provided so that auditreduce will work in the default configuration. 817c478bd9Sstevel@tonic-gate# 827c478bd9Sstevel@tonic-gateRESA=$(ROOTETCSECURITY)/audit 837c478bd9Sstevel@tonic-gateRESAL=$(RESA)/localhost 847c478bd9Sstevel@tonic-gateVARAUDIT=$(ROOT)/var/audit 857c478bd9Sstevel@tonic-gateAUDITDIRS=$(RESA) $(RESAL) $(VARAUDIT) 867c478bd9Sstevel@tonic-gate$(AUDITDIRS) := FILEMODE = 0750 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gateARSYMLNK=$(RESAL)/files 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate# 917c478bd9Sstevel@tonic-gate# message catalogue file 927c478bd9Sstevel@tonic-gate# 9345916cd2SjpkMSGFILES = `$(GREP) -l gettext $(COMMONDIR)/*.c` 947c478bd9Sstevel@tonic-gatePOFILE = libbsm.po 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate# 977c478bd9Sstevel@tonic-gate# Definitions for XML (DTD AND XSL) 987c478bd9Sstevel@tonic-gate# 997c478bd9Sstevel@tonic-gateDTD = adt_record.dtd.1 1007c478bd9Sstevel@tonic-gateXSL = adt_record.xsl.1 1017c478bd9Sstevel@tonic-gateROOTXMLDIR = $(ROOT)/usr/share/lib/xml 1027c478bd9Sstevel@tonic-gateROOTDTDDIR= $(ROOTXMLDIR)/dtd 1037c478bd9Sstevel@tonic-gateROOTXSLDIR= $(ROOTXMLDIR)/style 1047c478bd9Sstevel@tonic-gateROOTDTD= $(DTD:%=$(ROOTDTDDIR)/%) 1057c478bd9Sstevel@tonic-gateROOTXSL= $(XSL:%=$(ROOTXSLDIR)/%) 1067c478bd9Sstevel@tonic-gateROOTXMLDIRS = $(ROOTXMLDIR) $(ROOTDTDDIR) $(ROOTXSLDIR) 1077c478bd9Sstevel@tonic-gateROOTXMLFILES = $(ROOTDTD) $(ROOTXSL) 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate$(ROOTXMLDIRS) := FILEMODE = 755 1107c478bd9Sstevel@tonic-gate 1117c478bd9Sstevel@tonic-gate$(ROOTXMLFILES) := FILEMODE = 444 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(COMMONDIR) 1157c478bd9Sstevel@tonic-gateCPPFLAGS += -D_REENTRANT 1167c478bd9Sstevel@tonic-gate 117c0c79a3fStz204579CLEANFILES += $(GENSRCS) $(GENHDRS) 118c0c79a3fStz204579 119c0c79a3fStz204579ADTXMLFILE = $(COMMONDIR)/adt.xml 120c0c79a3fStz204579ADTXSDFILE = $(COMMONDIR)/adt.xsd 121c0c79a3fStz204579AUDITXML = auditxml 122c0c79a3fStz204579 1237c478bd9Sstevel@tonic-gate.KEEP_STATE: 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gateinstall: install_dirs install_data 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate# $(ROOTUSRLIB) $(ROOTLIBS) $(ROOTLINKS) 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gateinstall_h: $(ROOTHDRDIR) $(ROOTHDRS) $(ROOTCHDRS) 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gatecheck: $(CHECKHDRS) $(CHECKCHDRS) 132c0c79a3fStz204579 xmllint --schema $(ADTXSDFILE) --noout $(ADTXMLFILE) 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gateinstall_data: $(ESSRC) $(RESSRC) $(ROOTETCSECURITY) $(ETCSECURITYFILES) \ 1358523fda3SJan Friedel $(ROOTXMLFILES) 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gateinstall_dirs: $(AUDITDIRS) $(ARSYMLNK) $(ROOTXMLDIRS) 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gateaudit_uevents.h: mkhdr.sh audit_event.txt 1407c478bd9Sstevel@tonic-gate sh mkhdr.sh 1417c478bd9Sstevel@tonic-gate 142c0c79a3fStz204579$(COMMONDIR)/adt_event.check: $(COMMONDIR)/adt_event.h 143c0c79a3fStz204579 $(DOT_C_CHECK) $< 144c0c79a3fStz204579 145c0c79a3fStz204579clean clobber: clean_files 146c0c79a3fStz204579 147c0c79a3fStz204579clean_files: 148c0c79a3fStz204579 -$(RM) $(CLEANFILES) 149c0c79a3fStz204579 150c0c79a3fStz204579$(GENSRCS): $(ADTXMLFILE) $(AUDITXML) 151*4d2dc54fSDominik Hassler $(PERL) -I. $(AUDITXML) -o $(COMMONDIR) $(ADTXMLFILE) 152c0c79a3fStz204579 1538523fda3SJan Friedel$(ETCSECURITYFILES) $(RESA): \ 1547c478bd9Sstevel@tonic-gate $(ETCSECURITY) \ 1557c478bd9Sstevel@tonic-gate $(ROOTETCSECURITY) 1567c478bd9Sstevel@tonic-gate 1577c478bd9Sstevel@tonic-gate$(RESAL): $(RESA) 1587c478bd9Sstevel@tonic-gate 1597c478bd9Sstevel@tonic-gate$(ARSYMLNK): $(RESAL) 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gate$(ROOTHDRDIR): 1627c478bd9Sstevel@tonic-gate $(INS.dir) 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gate$(ROOTHDRDIR)/%:% 1657c478bd9Sstevel@tonic-gate $(INS.file) 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate$(ROOTHDRDIR)/%:$(COMMONDIR)/% 1687c478bd9Sstevel@tonic-gate $(INS.file) 1697c478bd9Sstevel@tonic-gate 1707c478bd9Sstevel@tonic-gate$(ROOTXMLDIRS): 1717c478bd9Sstevel@tonic-gate $(INS.dir) 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gate$(ROOTDTDDIR)/% $(ROOTXSLDIR)/%: % 1747c478bd9Sstevel@tonic-gate $(INS.file) 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gate$(AUDITDIRS): 1777c478bd9Sstevel@tonic-gate $(INS.dir) 1787c478bd9Sstevel@tonic-gate 1797c478bd9Sstevel@tonic-gate$(ARSYMLNK): 1807c478bd9Sstevel@tonic-gate $(RM) $@ 1817c478bd9Sstevel@tonic-gate $(SYMLINK) ../../../../var/audit $@ 1827c478bd9Sstevel@tonic-gate 1837c478bd9Sstevel@tonic-gate$(ETCSECURITY)/%: %.txt 1847c478bd9Sstevel@tonic-gate $(INS.rename) 1857c478bd9Sstevel@tonic-gate 1867c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY): 1877c478bd9Sstevel@tonic-gate $(INS.dir) 1887c478bd9Sstevel@tonic-gate 1897c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY)/%: %.txt 1907c478bd9Sstevel@tonic-gate $(INS.rename) 1917c478bd9Sstevel@tonic-gate 19245916cd2Sjpk$(POFILE): pofile_MSGFILES 1937c478bd9Sstevel@tonic-gate 19445916cd2Sjpk_msg: $(MSGDOMAINPOFILE) 1957c478bd9Sstevel@tonic-gate 1967c478bd9Sstevel@tonic-gate# has strings but doesn't use gettext 1977c478bd9Sstevel@tonic-gateadt_xlate.po: $(COMMONDIR)/adt_xlate.c 1987c478bd9Sstevel@tonic-gate $(RM) adt_xlate.po 1997c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS_ADT) $(COMMONDIR)/adt_xlate.c 2007c478bd9Sstevel@tonic-gate $(SED) "/^domain/d" < messages.po > adt_xlate.po 2017c478bd9Sstevel@tonic-gate $(RM) messages.po 2027c478bd9Sstevel@tonic-gate 203f808c858Sraf$(SUBDIRS): FRC 2047c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 2057c478bd9Sstevel@tonic-gate 2067c478bd9Sstevel@tonic-gateFRC: 20745916cd2Sjpk 20845916cd2Sjpkinclude ../Makefile.targ 20945916cd2Sjpkinclude ../../Makefile.msg.targ 210