diff options
author | Ondrej Čerman | 2018-11-17 11:56:33 +0100 |
---|---|---|
committer | Ondrej Čerman | 2018-11-17 11:56:33 +0100 |
commit | 59de360f63dfb7712f7869892ce2b9564ce7c1cd (patch) | |
tree | bf1ee5519272238e649e6ae30c15a3d894516114 | |
parent | 8d9899e77e37d1f68d4291103cb42146fe5da8ca (diff) |
Added kernel paths for other distros
-rw-r--r-- | Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1,7 +1,18 @@ TARGET := $(shell uname -r) -KERNEL_BUILD := /usr/src/linux-headers-$(TARGET) DKMS_ROOT_PATH := /usr/src/zenpower-0.1.0 +ifneq ("","$(wildcard /usr/src/linux-headers-$(TARGET)/*)") +# Ubuntu +KERNEL_BUILD := /usr/src/linux-headers-$(TARGET) +else +ifneq ("","$(wildcard /usr/src/kernels/$(TARGET)/*)") +# Fedora +KERNEL_BUILD := /usr/src/kernels/$(TARGET) +else +KERNEL_BUILD := $(KERNEL_MODULES)/build +endif +endif + obj-m := $(patsubst %,%.o,zenpower) obj-ko := $(patsubst %,%.ko,zenpower) |