~ubuntu-branches/ubuntu/raring/apparmor/raring

« back to all changes in this revision

Viewing changes to utils/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-03-23 16:42:01 UTC
  • Revision ID: james.westby@ubuntu.com-20070323164201-jkax6f0oku087b7l
Tags: upstream-2.0.1+510.dfsg
ImportĀ upstreamĀ versionĀ 2.0.1+510.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#       $Id: Makefile 238 2006-11-15 09:22:15Z steve-beattie $
 
2
# ----------------------------------------------------------------------
 
3
#    Copyright (c) 1999, 2004, 2005, 2006 NOVELL (All rights reserved)
 
4
#
 
5
#    This program is free software; you can redistribute it and/or
 
6
#    modify it under the terms of version 2 of the GNU General Public
 
7
#    License published by the Free Software Foundation.
 
8
#
 
9
#    This program is distributed in the hope that it will be useful,
 
10
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
#    GNU General Public License for more details.
 
13
#
 
14
#    You should have received a copy of the GNU General Public License
 
15
#    along with this program; if not, contact Novell, Inc.
 
16
# ----------------------------------------------------------------------
 
17
NAME            = apparmor-utils
 
18
all:
 
19
COMMONDIR=../common/
 
20
 
 
21
include common/Make.rules
 
22
 
 
23
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
 
24
ifeq ($(COMMONDIR_EXISTS), true)
 
25
common/Make.rules: $(COMMONDIR)/Make.rules
 
26
        ln -sf $(COMMONDIR) .
 
27
endif
 
28
 
 
29
TOOLS = genprof logprof autodep audit complain enforce \
 
30
        unconfined aa-eventd apparmor_status
 
31
 
 
32
all:
 
33
        make -C po all
 
34
 
 
35
# need some better way of determining this
 
36
DESTDIR=/
 
37
BINDIR=${DESTDIR}/usr/sbin
 
38
CONFDIR=${DESTDIR}/etc/apparmor
 
39
PERLDIR=${DESTDIR}/usr/lib/perl5/vendor_perl/Immunix
 
40
 
 
41
po/${NAME}.pot: ${TOOLS}
 
42
        make -C po ${NAME}.pot NAME=${NAME} SOURCES="${TOOLS} SubDomain.pm Reports.pm"
 
43
 
 
44
.PHONY: install
 
45
install:
 
46
        install -d ${CONFDIR}
 
47
        install -m 644 logprof.conf severity.db ${CONFDIR}
 
48
        install -d ${BINDIR}
 
49
        ln -sf apparmor_status ${BINDIR}/aa-status
 
50
        ln -sf audit ${BINDIR}/aa-audit
 
51
        ln -sf autodep ${BINDIR}/aa-autodep
 
52
        ln -sf complain ${BINDIR}/aa-complain
 
53
        ln -sf enforce ${BINDIR}/aa-enforce
 
54
        ln -sf genprof ${BINDIR}/aa-genprof
 
55
        ln -sf logprof ${BINDIR}/aa-logprof
 
56
        ln -sf unconfined ${BINDIR}/aa-unconfined
 
57
        install -m 755 ${TOOLS} ${BINDIR}
 
58
        install -d ${PERLDIR}
 
59
        install -m 755 SubDomain.pm Reports.pm Severity.pm ${PERLDIR}
 
60
        make -C po install DESTDIR=${DESTDIR} NAME=${NAME}
 
61
        mkdir -m 0700 -p $(DESTDIR)/var/log/apparmor
 
62
        
 
63
.PHONY: clean
 
64
clean:
 
65
        rm -f core core.* *.o *.s *.a *~
 
66
        rm -f $(NAME)-$(VERSION)-*.tar.gz Make.rules
 
67
        make -C po clean
 
68