From 6282d93b14b3174f753f772e8737e944482d15b5 Mon Sep 17 00:00:00 2001 From: Stefan Schindler Date: Fri, 9 Aug 2019 21:44:00 +0200 Subject: [PATCH] Add a userfriendly check --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 37df362..374561a 100644 --- a/Makefile +++ b/Makefile @@ -14,12 +14,17 @@ ifeq ($(KERNEL_VERSION),) KERNEL_VERSION=$(shell uname -r) endif -all: +all: check make -C /lib/modules/$(KERNEL_VERSION)/build/ M=$(PWD) modules -install: +install: check make -C /lib/modules/$(KERNEL_VERSION)/build/ M=$(PWD) modules_install depmod -a clean: make -C /lib/modules/$(KERNEL_VERSION)/build/ M=$(PWD) clean + +check: +ifeq ($(wildcard /lib/modules/$(KERNEL_VERSION)/build/.),) + @echo "did you install the \"linux-headers\" package?" +endif