mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-12-05 22:08:19 +00:00
First round of lm_sensors changes for the new I2C tree
* The i2c package can no longer be compiled as part of the lm_sensors tree
* The archive of the i2c package is removed
* smbus, i2c-dev and i2c-proc modules and headers have been removed; they
are now completely integrated into the i2c package
* The fake i2c.h header has been removed; this also allowed us to remove
the ugly LM_SENSORS and TBD defines.
* A new variable I2C_HEADERS is introduced in the Makefile. This allows
us to install the i2c headers in, for example, /usr/local/include/linux.
* All files now include <linux/i2c.h> instead of "i2c.h" and "smbus.h"
Status: 'make dep' works, all the right include files are found. 'make all'
does not yet work.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@496 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
17bb1f4934
commit
24e547b88e
35 files changed
+38
-1924
No files matched your search
@@ -26,6 +26,12 @@
|
||||
# Debian, you may want to change this to something like /usr/src/linux/include.
|
||||
LINUX_HEADERS=/usr/include
|
||||
|
||||
# If you have installed the i2c header at some other place (like
|
||||
# /usr/local/include/linux), set that directory here. Please check this out
|
||||
# if you get strange compilation errors; the default Linux i2c headers
|
||||
# may be used mistakenly.
|
||||
I2C_HEADERS=/usr/local/include
|
||||
|
||||
# The location of linux itself. This is only used to determine whether you
|
||||
# use a SMP kernel in the magic invocation just below.
|
||||
LINUX=/usr/src/linux
|
||||
@@ -44,16 +50,6 @@ MODVER := $(shell if cat $(LINUX_HEADERS)/linux/config.h $(LINUX_HEADERS)/linux/
|
||||
#MODVER := 0
|
||||
#MODVER := 1
|
||||
|
||||
# Uncomment the second line if you do not want to compile the included
|
||||
# i2c modules. WARNING! If the i2c module version does not match the
|
||||
# smbus/sensor module versions, you will get into severe problems.
|
||||
# If you want to use a self-compiled version of the i2c modules, make
|
||||
# sure <linux/i2c.h> contains the *correct* i2c header file! The stock
|
||||
# Linux 2.1.xxx and 2.2.x modules are *not* good enough; you really need
|
||||
# Simon Vogl's version!
|
||||
I2C := 1
|
||||
#I2C := 0
|
||||
|
||||
# Uncomment the second line if you are a developer. This will enable many
|
||||
# additional warnings at compile-time
|
||||
#WARN := 0
|
||||
@@ -129,9 +125,6 @@ MANGRP := root
|
||||
# The subdirectories we need to build things in
|
||||
SRCDIRS := kernel kernel/busses kernel/chips kernel/include lib prog/sensors \
|
||||
prog/dump prog/detect etc
|
||||
ifeq ($(I2C),1)
|
||||
SRCDIRS += i2c i2c/detect i2c/drivers i2c/eeprom
|
||||
endif
|
||||
|
||||
# Some often-used commands with default options
|
||||
MKDIR := mkdir -p
|
||||
@@ -149,7 +142,7 @@ GREP := grep
|
||||
# create non-kernel object files (which are linked into executables).
|
||||
# ARCFLAGS are used to create archive object files (static libraries), and
|
||||
# LIBCFLAGS are for shared library objects.
|
||||
CFLAGS := -I. -Ii2c -Ikernel/include -I$(LINUX_HEADERS) -O2 -DLM_SENSORS
|
||||
CFLAGS := -I. -Ikernel/include -I$(I2C_HEADERS) -I$(LINUX_HEADERS) -O2
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS += -DDEBUG
|
||||
@@ -160,10 +153,6 @@ CFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
|
||||
-Wcast-align -Wwrite-strings -Wnested-externs -Winline
|
||||
endif
|
||||
|
||||
ifeq ($(I2C),1)
|
||||
CFLAGS += -DI2C
|
||||
endif
|
||||
|
||||
MODCFLAGS := $(CFLAGS) -D__KERNEL__ -DMODULE -fomit-frame-pointer
|
||||
PROGCFLAGS := $(CFLAGS)
|
||||
ARCFLAGS := $(CFLAGS)
|
||||
|
||||
Reference in new issue
Block a user