2006-04-11 21:52:54 +00:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Copyright (c) 2004, 2005 NOVELL (All rights reserved)
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, contact Novell, Inc.
|
|
|
|
# ----------------------------------------------------------------------
|
2006-10-31 16:56:11 +00:00
|
|
|
NAME:=apache2-mod_apparmor
|
2006-04-11 21:52:54 +00:00
|
|
|
all:
|
2006-04-12 21:12:39 +00:00
|
|
|
COMMONDIR=../../common/
|
2006-04-11 21:52:54 +00:00
|
|
|
|
2006-11-04 21:34:47 +00:00
|
|
|
include common/Make.rules
|
2006-04-11 21:52:54 +00:00
|
|
|
|
|
|
|
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
|
|
|
|
ifeq ($(COMMONDIR_EXISTS), true)
|
2006-11-04 21:34:47 +00:00
|
|
|
common/Make.rules: $(COMMONDIR)/Make.rules
|
|
|
|
ln -sf $(COMMONDIR) .
|
2006-04-11 21:52:54 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
TARGET:=mod_apparmor.so
|
2007-04-03 19:17:20 +00:00
|
|
|
MANPAGES=mod_apparmor.8
|
|
|
|
|
2006-04-11 21:52:54 +00:00
|
|
|
APXS:=$(shell if [ -x "/usr/sbin/apxs2" ] ; then \
|
|
|
|
echo "/usr/sbin/apxs2" ; \
|
|
|
|
elif [ -x "/usr/sbin/apxs" ] ; then \
|
|
|
|
echo "/usr/sbin/apxs" ; \
|
2007-08-14 19:09:03 +00:00
|
|
|
elif [ -x "/usr/bin/apxs2" ] ; then \
|
|
|
|
echo "/usr/bin/apxs2" ; \
|
|
|
|
elif [ -x "/usr/bin/apxs" ] ; then \
|
|
|
|
echo "/usr/bin/apxs" ; \
|
2006-04-11 21:52:54 +00:00
|
|
|
else \
|
|
|
|
echo "apxs" ; \
|
|
|
|
fi )
|
|
|
|
APXS_INSTALL_DIR=$(shell ${APXS} -q LIBEXECDIR)
|
|
|
|
DESTDIR=
|
2011-02-08 08:18:36 -08:00
|
|
|
LIBAPPARMOR_FLAGS="-I../../libraries/libapparmor/src -L../../libraries/libapparmor/src/.libs -lapparmor"
|
2006-04-11 21:52:54 +00:00
|
|
|
|
2007-04-03 19:17:20 +00:00
|
|
|
all: $(TARGET) ${MANPAGES} ${HTMLMANPAGES}
|
2006-10-31 17:00:55 +00:00
|
|
|
|
2006-04-11 21:52:54 +00:00
|
|
|
%.so: %.c
|
|
|
|
${APXS} ${LIBAPPARMOR_FLAGS} -c $<
|
|
|
|
mv .libs/$@ .
|
|
|
|
|
|
|
|
.PHONY: install
|
2007-04-03 19:17:20 +00:00
|
|
|
install: ${TARGET} ${MANPAGES}
|
2006-04-11 21:52:54 +00:00
|
|
|
mkdir -p ${DESTDIR}/${APXS_INSTALL_DIR}
|
|
|
|
install -m 755 $< ${DESTDIR}/${APXS_INSTALL_DIR}
|
2007-04-03 19:17:20 +00:00
|
|
|
make install_manpages DESTDIR=${DESTDIR}
|
2006-04-11 21:52:54 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
2007-04-03 20:12:16 +00:00
|
|
|
clean: _clean
|
2006-11-04 21:34:47 +00:00
|
|
|
rm -rf .libs
|
2007-04-03 20:12:16 +00:00
|
|
|
rm -f *.la *.lo *.so *.o *.slo Make.rules
|