X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=9703598f418cf35d8e4b67f153255b58cb76d2dc;hb=67bda64d19e94d2acc0e86d379da39811312ef2b;hp=a3287114f65d6e024dc66b674cf28e37fbb23a41;hpb=ce21840ea9cd5c2ab2e46db302006b7c3d4ed34d;p=procprotect.git diff --git a/Makefile b/Makefile index a328711..9703598 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,21 @@ obj-m += procprotect.o +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/$(shell uname -r)/build M=$(PWD) modules + 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 + install -m 644 procprotect.service /usr/lib/systemd/system/procprotect.service