]> git.sur5r.net Git - groeck-it87/blob - Makefile
it87: upstream version
[groeck-it87] / Makefile
1 # For building for the current running version of Linux
2 TARGET          := $(shell uname -r)
3 # Or specific version
4 #TARGET         := 2.6.33.5
5 KERNEL_MODULES  := /lib/modules/$(TARGET)
6 KERNEL_BUILD    := $(KERNEL_MODULES)/build
7 # KERNEL_BUILD  := /usr/src/linux-headers-$(TARGET)
8
9 #SYSTEM_MAP     := $(KERNEL_BUILD)/System.map
10 SYSTEM_MAP      := /boot/System.map-$(TARGET)
11
12 DRIVER := it87
13
14 # Directory below /lib/modules/$(TARGET)/kernel into which to install
15 # the module:
16 MOD_SUBDIR = drivers/hwmon
17
18 obj-m   := $(DRIVER).o
19
20 MAKEFLAGS += --no-print-directory
21
22 .PHONY: all install modules modules_install clean
23
24 all: modules
25
26 # Targets for running make directly in the external module directory:
27
28 modules clean:
29         @$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) $@
30
31 install: modules_install
32
33 modules_install:
34         cp $(DRIVER).ko $(KERNEL_MODULES)/kernel/$(MOD_SUBDIR)
35         depmod -a -F $(SYSTEM_MAP) $(TARGET)