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