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-gatepackage := TARGET= package 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate.KEEP_STATE: 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateCOMMONDIR = common 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate# 447c478bd9Sstevel@tonic-gate# Macros for libbsm header files. These define user-level only interfaces. 457c478bd9Sstevel@tonic-gate# 467c478bd9Sstevel@tonic-gateGENHDRS = audit_uevents.h 4745916cd2SjpkHDRS = libbsm.h devices.h devalloc.h adt.h adt_event.h audit_private.h 48c0c79a3fStz204579GENSRCS = $(COMMONDIR)/adt_xlate.c $(COMMONDIR)/adt_event.h 497c478bd9Sstevel@tonic-gateCOMMONHDRS = $(HDRS:%=$(COMMONDIR)/%) 507c478bd9Sstevel@tonic-gateROOTHDRDIR = $(ROOT)/usr/include/bsm 517c478bd9Sstevel@tonic-gateROOTCHDRS = $(HDRS:%=$(ROOTHDRDIR)/%) 527c478bd9Sstevel@tonic-gateROOTHDRS = $(GENHDRS:%=$(ROOTHDRDIR)/%) 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gateCHECKCHDRS = $(COMMONHDRS:%.h=%.check) 557c478bd9Sstevel@tonic-gateCHECKHDRS = $(GENHDRS:%.h=%.check) 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate$(ROOTHDRS) := FILEMODE = 0644 587c478bd9Sstevel@tonic-gate$(ROOTCHDRS) := FILEMODE = 0644 597c478bd9Sstevel@tonic-gate 60*241c90a0SRichard Loweall install package: $(GENSRCS) $(SUBDIRS) 61c0c79a3fStz204579clean clobber delete: $(SUBDIRS) 62c0c79a3fStz204579 637c478bd9Sstevel@tonic-gate# 647c478bd9Sstevel@tonic-gate# Macros for libbsm database files. These should probably be installed 657c478bd9Sstevel@tonic-gate# from somewhere else. Until we find that better place, install them 667c478bd9Sstevel@tonic-gate# from here. 677c478bd9Sstevel@tonic-gate# 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gateROOTETCSECURITY = $(ROOT)/etc/security 707c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY) := DIRMODE = 0755 717c478bd9Sstevel@tonic-gate 72f8994074SJan FriedelESFILES = audit_class audit_event 737c478bd9Sstevel@tonic-gateESSRC = $(ESFILES:%=%.txt) 747c478bd9Sstevel@tonic-gateETCSECURITYFILES = $(ESFILES:%=$(ROOTETCSECURITY)/%) 757c478bd9Sstevel@tonic-gate$(ETCSECURITYFILES) := FILEMODE = 0644 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate# 787c478bd9Sstevel@tonic-gate# /etc/security/audit/localhost/files is a symbolic link to /var/audit. 797c478bd9Sstevel@tonic-gate# This is provided so that auditreduce will work in the default configuration. 807c478bd9Sstevel@tonic-gate# 817c478bd9Sstevel@tonic-gateRESA=$(ROOTETCSECURITY)/audit 827c478bd9Sstevel@tonic-gateRESAL=$(RESA)/localhost 837c478bd9Sstevel@tonic-gateVARAUDIT=$(ROOT)/var/audit 847c478bd9Sstevel@tonic-gateAUDITDIRS=$(RESA) $(RESAL) $(VARAUDIT) 857c478bd9Sstevel@tonic-gate$(AUDITDIRS) := FILEMODE = 0750 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gateARSYMLNK=$(RESAL)/files 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate# 907c478bd9Sstevel@tonic-gate# message catalogue file 917c478bd9Sstevel@tonic-gate# 9245916cd2SjpkMSGFILES = `$(GREP) -l gettext $(COMMONDIR)/*.c` 937c478bd9Sstevel@tonic-gatePOFILE = libbsm.po 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate# 967c478bd9Sstevel@tonic-gate# Definitions for XML (DTD AND XSL) 977c478bd9Sstevel@tonic-gate# 987c478bd9Sstevel@tonic-gateDTD = adt_record.dtd.1 997c478bd9Sstevel@tonic-gateXSL = adt_record.xsl.1 1007c478bd9Sstevel@tonic-gateROOTXMLDIR = $(ROOT)/usr/share/lib/xml 1017c478bd9Sstevel@tonic-gateROOTDTDDIR= $(ROOTXMLDIR)/dtd 1027c478bd9Sstevel@tonic-gateROOTXSLDIR= $(ROOTXMLDIR)/style 1037c478bd9Sstevel@tonic-gateROOTDTD= $(DTD:%=$(ROOTDTDDIR)/%) 1047c478bd9Sstevel@tonic-gateROOTXSL= $(XSL:%=$(ROOTXSLDIR)/%) 1057c478bd9Sstevel@tonic-gateROOTXMLDIRS = $(ROOTXMLDIR) $(ROOTDTDDIR) $(ROOTXSLDIR) 1067c478bd9Sstevel@tonic-gateROOTXMLFILES = $(ROOTDTD) $(ROOTXSL) 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate$(ROOTXMLDIRS) := FILEMODE = 755 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate$(ROOTXMLFILES) := FILEMODE = 444 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(COMMONDIR) 1147c478bd9Sstevel@tonic-gateCPPFLAGS += -D_REENTRANT 1157c478bd9Sstevel@tonic-gate 116c0c79a3fStz204579CLEANFILES += $(GENSRCS) $(GENHDRS) 117c0c79a3fStz204579 118c0c79a3fStz204579ADTXMLFILE = $(COMMONDIR)/adt.xml 119c0c79a3fStz204579ADTXSDFILE = $(COMMONDIR)/adt.xsd 120c0c79a3fStz204579AUDITXML = auditxml 121c0c79a3fStz204579 1227c478bd9Sstevel@tonic-gate.KEEP_STATE: 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gateinstall: install_dirs install_data 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gate# $(ROOTUSRLIB) $(ROOTLIBS) $(ROOTLINKS) 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gateinstall_h: $(ROOTHDRDIR) $(ROOTHDRS) $(ROOTCHDRS) 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gatecheck: $(CHECKHDRS) $(CHECKCHDRS) 131c0c79a3fStz204579 xmllint --schema $(ADTXSDFILE) --noout $(ADTXMLFILE) 1327c478bd9Sstevel@tonic-gate 1337c478bd9Sstevel@tonic-gateinstall_data: $(ESSRC) $(RESSRC) $(ROOTETCSECURITY) $(ETCSECURITYFILES) \ 1348523fda3SJan Friedel $(ROOTXMLFILES) 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gateinstall_dirs: $(AUDITDIRS) $(ARSYMLNK) $(ROOTXMLDIRS) 1377c478bd9Sstevel@tonic-gate 1387c478bd9Sstevel@tonic-gateaudit_uevents.h: mkhdr.sh audit_event.txt 1397c478bd9Sstevel@tonic-gate sh mkhdr.sh 1407c478bd9Sstevel@tonic-gate 141c0c79a3fStz204579$(COMMONDIR)/adt_event.check: $(COMMONDIR)/adt_event.h 142c0c79a3fStz204579 $(DOT_C_CHECK) $< 143c0c79a3fStz204579 144c0c79a3fStz204579clean clobber: clean_files 145c0c79a3fStz204579 146c0c79a3fStz204579clean_files: 147c0c79a3fStz204579 -$(RM) $(CLEANFILES) 148c0c79a3fStz204579 149c0c79a3fStz204579$(GENSRCS): $(ADTXMLFILE) $(AUDITXML) 150fa4b26fbSDominik Hassler $(PERL) -I. $(AUDITXML) -o $(COMMONDIR) $(ADTXMLFILE) 151c0c79a3fStz204579 1528523fda3SJan Friedel$(ETCSECURITYFILES) $(RESA): \ 1537c478bd9Sstevel@tonic-gate $(ETCSECURITY) \ 1547c478bd9Sstevel@tonic-gate $(ROOTETCSECURITY) 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gate$(RESAL): $(RESA) 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gate$(ARSYMLNK): $(RESAL) 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate$(ROOTHDRDIR): 1617c478bd9Sstevel@tonic-gate $(INS.dir) 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gate$(ROOTHDRDIR)/%:% 1647c478bd9Sstevel@tonic-gate $(INS.file) 1657c478bd9Sstevel@tonic-gate 1667c478bd9Sstevel@tonic-gate$(ROOTHDRDIR)/%:$(COMMONDIR)/% 1677c478bd9Sstevel@tonic-gate $(INS.file) 1687c478bd9Sstevel@tonic-gate 1697c478bd9Sstevel@tonic-gate$(ROOTXMLDIRS): 1707c478bd9Sstevel@tonic-gate $(INS.dir) 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gate$(ROOTDTDDIR)/% $(ROOTXSLDIR)/%: % 1737c478bd9Sstevel@tonic-gate $(INS.file) 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate$(AUDITDIRS): 1767c478bd9Sstevel@tonic-gate $(INS.dir) 1777c478bd9Sstevel@tonic-gate 1787c478bd9Sstevel@tonic-gate$(ARSYMLNK): 1797c478bd9Sstevel@tonic-gate $(RM) $@ 1807c478bd9Sstevel@tonic-gate $(SYMLINK) ../../../../var/audit $@ 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gate$(ETCSECURITY)/%: %.txt 1837c478bd9Sstevel@tonic-gate $(INS.rename) 1847c478bd9Sstevel@tonic-gate 1857c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY): 1867c478bd9Sstevel@tonic-gate $(INS.dir) 1877c478bd9Sstevel@tonic-gate 1887c478bd9Sstevel@tonic-gate$(ROOTETCSECURITY)/%: %.txt 1897c478bd9Sstevel@tonic-gate $(INS.rename) 1907c478bd9Sstevel@tonic-gate 19145916cd2Sjpk$(POFILE): pofile_MSGFILES 1927c478bd9Sstevel@tonic-gate 19345916cd2Sjpk_msg: $(MSGDOMAINPOFILE) 1947c478bd9Sstevel@tonic-gate 1957c478bd9Sstevel@tonic-gate# has strings but doesn't use gettext 1967c478bd9Sstevel@tonic-gateadt_xlate.po: $(COMMONDIR)/adt_xlate.c 1977c478bd9Sstevel@tonic-gate $(RM) adt_xlate.po 1987c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS_ADT) $(COMMONDIR)/adt_xlate.c 1997c478bd9Sstevel@tonic-gate $(SED) "/^domain/d" < messages.po > adt_xlate.po 2007c478bd9Sstevel@tonic-gate $(RM) messages.po 2017c478bd9Sstevel@tonic-gate 202f808c858Sraf$(SUBDIRS): FRC 2037c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 2047c478bd9Sstevel@tonic-gate 2057c478bd9Sstevel@tonic-gateFRC: 20645916cd2Sjpk 20745916cd2Sjpkinclude ../Makefile.targ 20845916cd2Sjpkinclude ../../Makefile.msg.targ 209