Makefile revision f808c858fa61e7769218966759510a8b1190dfcf
012a352f4b26cfd874db8d06debc495c2303e8b2Bob Halley#
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# CDDL HEADER START
bc6f4c1c4c1b739fd06d2de05b77b9d08c4d8a5aTinderbox User#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# You may not use this file except in compliance with the License.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User# or http://www.opensolaris.org/os/licensing.
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence# See the License for the specific language governing permissions
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt# and limitations under the License.
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt#
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt# If applicable, add the following below this CDDL HEADER, with the
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# fields enclosed by brackets "[]" replaced with your own identifying
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence# information: Portions Copyright [yyyy] [name of copyright owner]
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# CDDL HEADER END
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# Use is subject to license terms.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# ident "%Z%%M% %I% %E% SMI"
c7b785510e3f517a0c98c0b6b6e6ad8f359e9e4cMark Andrews#
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyinclude ../Makefile.lib
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan HuntSUBDIRS = $(MACH)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(BUILD64)SUBDIRS += $(MACH64)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan HuntXGETFLAGS_ADT += -a
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Huntall := TARGET= all
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Huntclean := TARGET= clean
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Huntclobber := TARGET= clobber
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Huntdelete := TARGET= delete
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Huntinstall := TARGET= install
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Huntlint := TARGET= lint
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Huntpackage := TARGET= package
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence.KEEP_STATE:
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrewsall clean clobber delete install lint package: $(SUBDIRS)
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews
18483fce5b9d1e02748bdcb916014cedea654f78Mark AndrewsCOMMONDIR = common
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews#
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews# Macros for libbsm header files. These define user-level only interfaces.
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews#
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceGENHDRS = audit_uevents.h
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyHDRS = libbsm.h devices.h devalloc.h adt.h adt_event.h audit_private.h
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceCOMMONHDRS = $(HDRS:%=$(COMMONDIR)/%)
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceROOTHDRDIR = $(ROOT)/usr/include/bsm
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan HuntROOTCHDRS = $(HDRS:%=$(ROOTHDRDIR)/%)
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceROOTHDRS = $(GENHDRS:%=$(ROOTHDRDIR)/%)
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark AndrewsCHECKCHDRS = $(COMMONHDRS:%.h=%.check)
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark AndrewsCHECKHDRS = $(GENHDRS:%.h=%.check)
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews
12a3ab37fe6556406acdf92fc7c5f198d603ca2eMark Andrews$(ROOTHDRS) := FILEMODE = 0644
f5cfcbf2f7906fb59c2b8b9b8fc9c7a75ac44dabMark Andrews$(ROOTCHDRS) := FILEMODE = 0644
2d46d268ccff30bb50e661b47c6496d23d9156c7Mark Andrews
2d46d268ccff30bb50e661b47c6496d23d9156c7Mark Andrews#
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews# Macros for libbsm database files. These should probably be installed
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# from somewhere else. Until we find that better place, install them
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews# from here.
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence#
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceROOTETCSECURITY = $(ROOT)/etc/security
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews$(ROOTETCSECURITY) := DIRMODE = 0755
2d9bd38ec3fbbfe920757b8972d94f664a9b354bMark Andrews$(ROOTETCSECURITY) := OWNER = root
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews$(ROOTETCSECURITY) := GROUP = sys
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
18483fce5b9d1e02748bdcb916014cedea654f78Mark AndrewsESFILES = audit_class audit_event
8319af16557b81eba3277ee67215285f0823b587Mark AndrewsESSRC = $(ESFILES:%=%.txt)
8319af16557b81eba3277ee67215285f0823b587Mark AndrewsETCSECURITYFILES = $(ESFILES:%=$(ROOTETCSECURITY)/%)
aee5e9cbacd8f88325840b8a498876f4319b0890Mark Andrews$(ETCSECURITYFILES) := FILEMODE = 0644
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews$(ETCSECURITYFILES) := OWNER = root
9e5854255178c04170bc98839282d4cf3fae7443Mark Andrews$(ETCSECURITYFILES) := GROUP = sys
f7a6d4f915ce622d988916397f313b33ae954afcMark Andrews
f7a6d4f915ce622d988916397f313b33ae954afcMark AndrewsEESFILES = audit_startup
18483fce5b9d1e02748bdcb916014cedea654f78Mark AndrewsEESSRC = $(EESFILES:%=%.txt)
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceEETCSECURITYFILES = $(EESFILES:%=$(ROOTETCSECURITY)/%)
66c9805347f24da946c17a881e489ffe2e89c25dMark Andrews$(EETCSECURITYFILES) := FILEMODE = 0744
66c9805347f24da946c17a881e489ffe2e89c25dMark Andrews$(EETCSECURITYFILES) := OWNER = root
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews$(EETCSECURITYFILES) := GROUP = sys
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
66c9805347f24da946c17a881e489ffe2e89c25dMark AndrewsRESFILES = audit_control audit_user
66c9805347f24da946c17a881e489ffe2e89c25dMark AndrewsRESSRC = $(RESFILES:%=%.txt)
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceROOTETCSECURITYFILES = $(RESFILES:%=$(ROOTETCSECURITY)/%)
c32b87bc54abacf95fb3b063d72b7d1855c1643bMichael Graff$(ROOTETCSECURITYFILES) := FILEMODE = 0640
7f9f8c13c5e5e26e0ba2b82c0900d11ecf6269ceMark Andrews$(ROOTETCSECURITYFILES) := OWNER = root
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence$(ROOTETCSECURITYFILES) := GROUP = sys
c3e6fbe4b7471d843d015e3f1737b7edb9d0c547Mark Andrews
c3e6fbe4b7471d843d015e3f1737b7edb9d0c547Mark Andrews#
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence# /etc/security/audit/localhost/files is a symbolic link to /var/audit.
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence# This is provided so that auditreduce will work in the default configuration.
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence#
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceRESA=$(ROOTETCSECURITY)/audit
fe9b24391db337a7ff2845f89a932ae82ebef5ecMark AndrewsRESAL=$(RESA)/localhost
18483fce5b9d1e02748bdcb916014cedea654f78Mark AndrewsVARAUDIT=$(ROOT)/var/audit
6376f6189950156cc1488c86f22b19dd4feec11cMark AndrewsAUDITDIRS=$(RESA) $(RESAL) $(VARAUDIT)
5e47b4200ed81b8e18e165fe3a626d9992003db4Mark Andrews$(AUDITDIRS) := FILEMODE = 0750
5e47b4200ed81b8e18e165fe3a626d9992003db4Mark Andrews$(AUDITDIRS) := OWNER = root
5e47b4200ed81b8e18e165fe3a626d9992003db4Mark Andrews$(AUDITDIRS) := GROUP = sys
5e47b4200ed81b8e18e165fe3a626d9992003db4Mark Andrews
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyARSYMLNK=$(RESAL)/files
2320f230995995595438a9d9301d84931fd266ceMark Andrews
c427260a8678f2e99a2337fb95ec98d9c9ee8c05Mark Andrews#
620a452ebe92fff63e85c5930a6e6dc8d9455918Mark Andrews# message catalogue file
620a452ebe92fff63e85c5930a6e6dc8d9455918Mark Andrews#
6dcb47e37f9f0cdb94bdabc3fa157ff07983c590Mark AndrewsMSGFILES = `$(GREP) -l gettext $(COMMONDIR)/*.c`
6dcb47e37f9f0cdb94bdabc3fa157ff07983c590Mark AndrewsPOFILE = libbsm.po
2c4c405aeb7d3900ec2d4e4de888d47eae04ff82Mark Andrews
2c4c405aeb7d3900ec2d4e4de888d47eae04ff82Mark Andrews#
43b3337ba58d70ca34f4d91e8c6c5e13a54af690Mark Andrews# Definitions for XML (DTD AND XSL)
43b3337ba58d70ca34f4d91e8c6c5e13a54af690Mark Andrews#
f10370fd44f05fecc808d89c01b2d50df2b232f3Mark AndrewsDTD = adt_record.dtd.1
f10370fd44f05fecc808d89c01b2d50df2b232f3Mark AndrewsXSL = adt_record.xsl.1
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark AndrewsROOTXMLDIR = $(ROOT)/usr/share/lib/xml
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark AndrewsROOTDTDDIR= $(ROOTXMLDIR)/dtd
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark AndrewsROOTXSLDIR= $(ROOTXMLDIR)/style
693d70f96fc2b3c1830580edcc29146afd6a9f61Mark AndrewsROOTDTD= $(DTD:%=$(ROOTDTDDIR)/%)
d3347bd01baee56e476982a7443ba18cdbaeebe1Mark AndrewsROOTXSL= $(XSL:%=$(ROOTXSLDIR)/%)
d3347bd01baee56e476982a7443ba18cdbaeebe1Mark AndrewsROOTXMLDIRS = $(ROOTXMLDIR) $(ROOTDTDDIR) $(ROOTXSLDIR)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyROOTXMLFILES = $(ROOTDTD) $(ROOTXSL)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTXMLDIRS) := FILEMODE = 755
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt$(ROOTXMLDIRS) := OWNER = root
66c9805347f24da946c17a881e489ffe2e89c25dMark Andrews$(ROOTXMLDIRS) := GROUP = sys
4c6bf2d14ee70f1966d4c18475f93211fbc928e1Mark Andrews
66c9805347f24da946c17a881e489ffe2e89c25dMark Andrews$(ROOTXMLFILES) := FILEMODE = 444
66c9805347f24da946c17a881e489ffe2e89c25dMark Andrews$(ROOTXMLFILES) := OWNER = root
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTXMLFILES) := GROUP = bin
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyCPPFLAGS += -I$(COMMONDIR)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyCPPFLAGS += -D_REENTRANT
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews.KEEP_STATE:
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrenceinstall: install_dirs install_data
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews# $(ROOTUSRLIB) $(ROOTLIBS) $(ROOTLINKS)
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrewsinstall_h: $(ROOTHDRDIR) $(ROOTHDRS) $(ROOTCHDRS)
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrews
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrewscheck: $(CHECKHDRS) $(CHECKCHDRS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinstall_data: $(ESSRC) $(RESSRC) $(ROOTETCSECURITY) $(ETCSECURITYFILES) \
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence $(EETCSECURITYFILES) $(ROOTETCSECURITYFILES) $(ROOTXMLFILES)
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Huntinstall_dirs: $(AUDITDIRS) $(ARSYMLNK) $(ROOTXMLDIRS)
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyaudit_uevents.h: mkhdr.sh audit_event.txt
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley sh mkhdr.sh
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ETCSECURITYFILES) $(EETCSECURITYFILES) $(ROOTETCSECURITYFILES) $(RESA): \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(ETCSECURITY) \
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt $(ROOTETCSECURITY)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(RESAL): $(RESA)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt$(ARSYMLNK): $(RESAL)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTHDRDIR):
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(INS.dir)
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTHDRDIR)/%:%
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt $(INS.file)
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTHDRDIR)/%:$(COMMONDIR)/%
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(INS.file)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt$(ROOTXMLDIRS):
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(INS.dir)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTDTDDIR)/% $(ROOTXSLDIR)/%: %
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(INS.file)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt$(AUDITDIRS):
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(INS.dir)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ARSYMLNK):
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt $(RM) $@
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt $(SYMLINK) ../../../../var/audit $@
18483fce5b9d1e02748bdcb916014cedea654f78Mark Andrews
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt$(ETCSECURITY)/%: %.txt
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(INS.rename)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
$(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