mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
25 lines
732 B
Makefile
25 lines
732 B
Makefile
# Makefile for AppArmor Linux Security Module (previously called "SubDomain")
|
|
#
|
|
# kernel build Makefile is the Kbuild file
|
|
|
|
REPO_VERSION := $(shell if [ -x /usr/bin/svn ] ; then \
|
|
/usr/bin/svn info . 2> /dev/null | grep "^Last Changed Rev:" | sed "s/^Last Changed Rev: //" ; \
|
|
fi)
|
|
|
|
ifeq ("${REPO_VERSION}", "")
|
|
REPO_VERSION := "unknown"
|
|
endif
|
|
|
|
KERNELVER := $(shell uname -r)
|
|
|
|
KERNELDIR := /lib/modules/${KERNELVER}/build
|
|
|
|
all:
|
|
$(MAKE) -C $(KERNELDIR) M=`pwd` APPARMOR_VER=${REPO_VERSION} $@
|
|
mv apparmor.ko apparmor-${KERNELVER}.ko
|
|
mv aamatch/aamatch_pcre.ko aamatch_pcre-${KERNELVER}.ko
|
|
|
|
clean:
|
|
rm -f *.o *.ko *.mod.c .*.cmd Module{s,}.symvers \
|
|
aamatch/*.o aamatch/*.ko aamatch/.*.cmd aamatch/*.mod.c
|
|
rm -rf .tmp_versions
|