X-Git-Url: http://git.onelab.eu/?p=procprotect.git;a=blobdiff_plain;f=Makefile;h=16b125b98854faa6ce279e45d35ec55fd7193c3d;hp=04471df53cc60432f087fae524a61511681ec1cc;hb=bc85bdf330f5f03f625e5c2ea341b0df5a48268d;hpb=384193ea185181ef94aff22832b878f3bb8fd506 diff --git a/Makefile b/Makefile index 04471df..16b125b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,22 @@ obj-m += procprotect.o -all: - make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules +KVER=$(shell uname -r) +ARCH=$(shell uname -m) + +# Is there an easy way of fetching this automatically, short of mapping /etc/redhat-release +DIST=fc18 + +ifeq ($(wildcard /lib/modules/$(KVER)/build),) + KVER=3.10.6-100.$(DIST).$(ARCH) +endif + +all: + make -C /lib/modules/$(KVER)/build M=$(PWD) modules clean: - make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean + make -C /lib/modules/$(KVER)/build M=$(PWD) clean + +install: + install -D -m 755 procprotect.ko /lib/modules/$(KVER)/net/procprotect/procprotect.ko + mkdir -p /etc/modules-load.d + install -m 644 procprotect.conf /etc/modules-load.d/procprotect.conf