mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-21 19:51:45 +00:00
Take kernel source location from /lib/modules/x.x.x/build
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1602 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
766ac8021e
commit
6854f23c91
1 file changed
+12
-10
+12
-10
@@ -3,10 +3,15 @@
|
||||
|
||||
VERSION=1.40
|
||||
|
||||
# The currently running kernel version. This is used right below to
|
||||
# determine where the kernel sources can be found.
|
||||
KERNELVERSION := $(shell uname -r)
|
||||
|
||||
# The location of linux itself. This is used to find the kernel headers
|
||||
# and other things.
|
||||
LINUX=/usr/src/linux
|
||||
LINUX_HEADERS=$(LINUX)/include
|
||||
#LINUX := /usr/src/linux
|
||||
LINUX := /lib/modules/$(KERNELVERSION)/build
|
||||
LINUX_HEADERS := $(LINUX)/include
|
||||
|
||||
# Uncomment the third line on SMP systems if the magic invocation fails. It
|
||||
# is a bit complicated because SMP configuration changed around kernel 2.1.130
|
||||
@@ -32,10 +37,7 @@ ifeq ($(MODVER),1)
|
||||
MODCPPFLAGS += -DMODVERSIONS -include $(LINUX_HEADERS)/linux/modversions.h
|
||||
endif
|
||||
|
||||
VER = $(shell uname -r)
|
||||
INCLUDEDIR= /lib/modules/$(VER)/build/include
|
||||
|
||||
CFLAGS= $(MODCPPFLAGS) -D__KERNEL__ -DMODULE -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -I$(INCLUDEDIR)
|
||||
CFLAGS := $(MODCPPFLAGS) -D__KERNEL__ -DMODULE -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -I$(LINUX_HEADERS)
|
||||
|
||||
OBJS = p4b_smbus.o
|
||||
|
||||
@@ -43,16 +45,16 @@ all: $(OBJS)
|
||||
|
||||
install:
|
||||
$(MAKE)
|
||||
install -d /lib/modules/$(VER)/kernel/drivers/char
|
||||
install -c p4bsmbus.o /lib/modules/$(VER)/kernel/drivers/char
|
||||
install -d /lib/modules/$(KERNELVERSION)/kernel/drivers/char
|
||||
install -c p4bsmbus.o /lib/modules/$(KERNELVERSION)/kernel/drivers/char
|
||||
# test ! -x /dev/watchdog || mknod -m 600 /dev/watchdog c 10 130
|
||||
# test ! -x /dev/temperature || mknod -m 600 /dev/temperature c 10 131
|
||||
|
||||
inst:
|
||||
$(MAKE)
|
||||
rmmod p4b_smbus
|
||||
install -d /lib/modules/$(VER)/kernel/drivers/char
|
||||
install -c p4b_smbus.o /lib/modules/$(VER)/kernel/drivers/char
|
||||
install -d /lib/modules/$(KERNELVERSION)/kernel/drivers/char
|
||||
install -c p4b_smbus.o /lib/modules/$(KERNEL)/kernel/drivers/char
|
||||
depmod -a
|
||||
# modprobe p4b_smbus
|
||||
|
||||
|
||||
Reference in new issue
Block a user