Home | History | Annotate | Download | only in libbsm
      1      0    stevel #
      2      0    stevel # CDDL HEADER START
      3      0    stevel #
      4      0    stevel # The contents of this file are subject to the terms of the
      5   1453       gww # Common Development and Distribution License (the "License").
      6   1453       gww # You may not use this file except in compliance with the License.
      7      0    stevel #
      8      0    stevel # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9      0    stevel # or http://www.opensolaris.org/os/licensing.
     10      0    stevel # See the License for the specific language governing permissions
     11      0    stevel # and limitations under the License.
     12      0    stevel #
     13      0    stevel # When distributing Covered Code, include this CDDL HEADER in each
     14      0    stevel # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15      0    stevel # If applicable, add the following below this CDDL HEADER, with the
     16      0    stevel # fields enclosed by brackets "[]" replaced with your own identifying
     17      0    stevel # information: Portions Copyright [yyyy] [name of copyright owner]
     18      0    stevel #
     19      0    stevel # CDDL HEADER END
     20      0    stevel #
     21      0    stevel #
     22  10207     James # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23      0    stevel # Use is subject to license terms.
     24      0    stevel #
     25      0    stevel 
     26      0    stevel include ../Makefile.lib
     27      0    stevel 
     28   2522       raf SUBDIRS =	$(MACH)
     29   2522       raf $(BUILD64)SUBDIRS += $(MACH64)
     30      0    stevel 
     31      0    stevel XGETFLAGS_ADT += -a
     32      0    stevel 
     33      0    stevel all :=		TARGET= all
     34      0    stevel clean :=	TARGET= clean
     35      0    stevel clobber :=	TARGET= clobber
     36      0    stevel delete :=	TARGET= delete
     37      0    stevel install :=	TARGET= install
     38      0    stevel lint :=		TARGET= lint
     39      0    stevel package :=	TARGET= package
     40      0    stevel 
     41      0    stevel .KEEP_STATE:
     42      0    stevel 
     43      0    stevel COMMONDIR = common
     44      0    stevel 
     45      0    stevel #
     46      0    stevel # Macros for libbsm header files. These define user-level only interfaces.
     47      0    stevel #
     48      0    stevel GENHDRS = audit_uevents.h
     49   1676       jpk HDRS = libbsm.h devices.h devalloc.h adt.h adt_event.h audit_private.h
     50   4176  tz204579 GENSRCS =	$(COMMONDIR)/adt_xlate.c $(COMMONDIR)/adt_event.h
     51      0    stevel COMMONHDRS =	$(HDRS:%=$(COMMONDIR)/%)
     52      0    stevel ROOTHDRDIR = 	$(ROOT)/usr/include/bsm
     53      0    stevel ROOTCHDRS = 	$(HDRS:%=$(ROOTHDRDIR)/%)
     54      0    stevel ROOTHDRS = 	$(GENHDRS:%=$(ROOTHDRDIR)/%)
     55      0    stevel 
     56      0    stevel CHECKCHDRS =	$(COMMONHDRS:%.h=%.check)
     57      0    stevel CHECKHDRS =	$(GENHDRS:%.h=%.check)
     58      0    stevel 
     59      0    stevel $(ROOTHDRS) := 	FILEMODE = 0644
     60      0    stevel $(ROOTCHDRS) :=	FILEMODE = 0644
     61   4176  tz204579 
     62   4176  tz204579 all install lint package: $(GENSRCS) $(SUBDIRS)
     63   4176  tz204579 clean clobber delete: $(SUBDIRS)
     64      0    stevel 
     65      0    stevel #
     66      0    stevel # Macros for libbsm database files. These should probably be installed
     67      0    stevel # from somewhere else. Until we find that better place, install them
     68      0    stevel # from here.
     69      0    stevel #
     70      0    stevel 
     71      0    stevel ROOTETCSECURITY = 	$(ROOT)/etc/security
     72      0    stevel $(ROOTETCSECURITY) := 	DIRMODE = 0755
     73      0    stevel 
     74   3217       gww ESFILES =		audit_class audit_control audit_event audit_user
     75      0    stevel ESSRC =			$(ESFILES:%=%.txt)
     76      0    stevel ETCSECURITYFILES =	$(ESFILES:%=$(ROOTETCSECURITY)/%)
     77      0    stevel $(ETCSECURITYFILES) :=	FILEMODE = 0644
     78      0    stevel 
     79      0    stevel #
     80      0    stevel # /etc/security/audit/localhost/files is a symbolic link to /var/audit.
     81      0    stevel # This is provided so that auditreduce will work in the default configuration.
     82      0    stevel #
     83      0    stevel RESA=$(ROOTETCSECURITY)/audit
     84      0    stevel RESAL=$(RESA)/localhost
     85      0    stevel VARAUDIT=$(ROOT)/var/audit
     86      0    stevel AUDITDIRS=$(RESA) $(RESAL) $(VARAUDIT)
     87      0    stevel $(AUDITDIRS) := FILEMODE = 0750
     88      0    stevel 
     89      0    stevel ARSYMLNK=$(RESAL)/files
     90      0    stevel 
     91      0    stevel #
     92      0    stevel # message catalogue file
     93      0    stevel #
     94   1676       jpk MSGFILES =	`$(GREP) -l gettext $(COMMONDIR)/*.c`
     95   1676       jpk POFILE =	libbsm.po
     96      0    stevel 
     97      0    stevel #
     98      0    stevel # Definitions for XML (DTD AND XSL)
     99      0    stevel #
    100      0    stevel DTD =		adt_record.dtd.1
    101      0    stevel XSL =		adt_record.xsl.1
    102      0    stevel ROOTXMLDIR =	$(ROOT)/usr/share/lib/xml
    103      0    stevel ROOTDTDDIR=	$(ROOTXMLDIR)/dtd
    104      0    stevel ROOTXSLDIR=	$(ROOTXMLDIR)/style
    105      0    stevel ROOTDTD=	$(DTD:%=$(ROOTDTDDIR)/%)
    106      0    stevel ROOTXSL=	$(XSL:%=$(ROOTXSLDIR)/%)
    107      0    stevel ROOTXMLDIRS =	$(ROOTXMLDIR) $(ROOTDTDDIR) $(ROOTXSLDIR)
    108      0    stevel ROOTXMLFILES =	$(ROOTDTD) $(ROOTXSL)
    109      0    stevel 
    110      0    stevel $(ROOTXMLDIRS) :=  FILEMODE = 755
    111      0    stevel 
    112      0    stevel $(ROOTXMLFILES) :=  FILEMODE = 444
    113      0    stevel 
    114      0    stevel 
    115      0    stevel CPPFLAGS += -I$(COMMONDIR)
    116      0    stevel CPPFLAGS += -D_REENTRANT
    117      0    stevel 
    118   4176  tz204579 CLEANFILES += $(GENSRCS) $(GENHDRS)
    119   4176  tz204579 
    120   4176  tz204579 ADTXMLFILE =	$(COMMONDIR)/adt.xml
    121   4176  tz204579 ADTXSDFILE =	$(COMMONDIR)/adt.xsd
    122   4176  tz204579 AUDITXML =	auditxml
    123   4176  tz204579 
    124      0    stevel .KEEP_STATE:
    125      0    stevel 
    126      0    stevel install: install_dirs install_data
    127      0    stevel 
    128      0    stevel #		$(ROOTUSRLIB) $(ROOTLIBS) $(ROOTLINKS)
    129      0    stevel 
    130      0    stevel install_h: $(ROOTHDRDIR) $(ROOTHDRS) $(ROOTCHDRS)
    131      0    stevel 
    132      0    stevel check:	$(CHECKHDRS) $(CHECKCHDRS)
    133   4176  tz204579 	xmllint --schema $(ADTXSDFILE) --noout $(ADTXMLFILE)
    134      0    stevel 
    135      0    stevel install_data: $(ESSRC) $(RESSRC) $(ROOTETCSECURITY) $(ETCSECURITYFILES) \
    136  11129       Jan 	$(ROOTXMLFILES)
    137      0    stevel 
    138      0    stevel install_dirs: $(AUDITDIRS) $(ARSYMLNK) $(ROOTXMLDIRS)
    139      0    stevel 
    140      0    stevel audit_uevents.h: mkhdr.sh audit_event.txt
    141      0    stevel 	sh mkhdr.sh
    142   4176  tz204579 
    143   4176  tz204579 $(COMMONDIR)/adt_event.check:	$(COMMONDIR)/adt_event.h
    144   4176  tz204579 	$(DOT_C_CHECK) $<
    145   4176  tz204579 
    146   4176  tz204579 clean clobber: clean_files
    147   4176  tz204579 
    148   4176  tz204579 clean_files:
    149   4176  tz204579 	-$(RM) $(CLEANFILES)
    150   4176  tz204579 
    151   4176  tz204579 $(GENSRCS): $(ADTXMLFILE) $(AUDITXML)
    152   7496       gww 	$(PERL) $(AUDITXML) -o $(COMMONDIR) $(ADTXMLFILE)
    153      0    stevel 
    154  11129       Jan $(ETCSECURITYFILES) $(RESA): \
    155      0    stevel 	$(ETCSECURITY) \
    156      0    stevel 	$(ROOTETCSECURITY)
    157      0    stevel 
    158      0    stevel $(RESAL): $(RESA)
    159      0    stevel 
    160      0    stevel $(ARSYMLNK): $(RESAL)
    161      0    stevel 
    162      0    stevel $(ROOTHDRDIR):
    163      0    stevel 	$(INS.dir)
    164      0    stevel 
    165      0    stevel $(ROOTHDRDIR)/%:%
    166      0    stevel 	$(INS.file)
    167      0    stevel 
    168      0    stevel $(ROOTHDRDIR)/%:$(COMMONDIR)/%
    169      0    stevel 	$(INS.file)
    170      0    stevel 
    171      0    stevel $(ROOTXMLDIRS):
    172      0    stevel 	$(INS.dir)
    173      0    stevel 
    174      0    stevel $(ROOTDTDDIR)/% $(ROOTXSLDIR)/%: %
    175      0    stevel 	$(INS.file)
    176      0    stevel 
    177      0    stevel $(AUDITDIRS):
    178      0    stevel 	$(INS.dir)
    179      0    stevel 
    180      0    stevel $(ARSYMLNK): 
    181      0    stevel 	$(RM) $@
    182      0    stevel 	$(SYMLINK) ../../../../var/audit $@
    183      0    stevel 
    184      0    stevel $(ETCSECURITY)/%: %.txt
    185      0    stevel 	$(INS.rename)
    186      0    stevel 
    187      0    stevel $(ROOTETCSECURITY):
    188      0    stevel 	$(INS.dir)
    189      0    stevel 
    190      0    stevel $(ROOTETCSECURITY)/%: %.txt
    191      0    stevel 	$(INS.rename)
    192      0    stevel 
    193   1676       jpk $(POFILE):	 pofile_MSGFILES
    194      0    stevel 
    195   1676       jpk _msg:	$(MSGDOMAINPOFILE)
    196      0    stevel 
    197      0    stevel # has strings but doesn't use gettext
    198      0    stevel adt_xlate.po: $(COMMONDIR)/adt_xlate.c
    199      0    stevel 	$(RM) adt_xlate.po
    200      0    stevel 	$(XGETTEXT) $(XGETFLAGS_ADT) $(COMMONDIR)/adt_xlate.c
    201      0    stevel 	$(SED) "/^domain/d" < messages.po > adt_xlate.po
    202      0    stevel 	$(RM) messages.po
    203      0    stevel 
    204   2522       raf $(SUBDIRS):	FRC
    205      0    stevel 	@cd $@; pwd; $(MAKE) $(TARGET)
    206      0    stevel 
    207      0    stevel FRC:
    208   1676       jpk 
    209   1676       jpk include ../Makefile.targ
    210   1676       jpk include ../../Makefile.msg.targ
    211