makefile. This prevents ever picking up headers from /usr/include
for module builds. Headers must be located in
/lib/modules/`uname -r`/build
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1746 7894878c-1315-0410-8ee3-d5d059ff63e0
Christian Hammers <ch@laathspell.de> wrote:
> Hello
>
> I always got the following error when compiling lm_sensors-2.7.0:
>
>
>> gcc -DMODVERSIONS -include /lib/modules/2.4.20-bigvideo-1/build/include/linux/modversions.h -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer -I. -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.20-bigvideo-1/build/include -O2 -c kernel/busses/i2c-amd8111.c -o kernel/busses/i2c-amd8111.o
>
>
>
>>> kernel/busses/i2c-amd8111.c:26:2: #error Your i2c is too old - i2c-2.7.0 or greater required!
>
>
>
> This is a compile problem as the include files of 2.7.0 are in
> /usr/local/include/linux/. gcc-3.2.3 just puts /usr/local/include at the
> end of the list although it is first on the command line and the info
> page says the list is scanned left to right.
>
>> GNU CPP version 3.2.3 20030316 (Debian prerelease) (cpplib)
>> (i386 Linux/ELF)
>> GNU C version 3.2.3 20030316 (Debian prerelease) (i386-linux)
>> compiled by GNU C version 3.2.3 20030316 (Debian prerelease).
>> ignoring nonexistent directory "/usr/i386-linux/include"
>> ignoring duplicate directory "/usr/local/include"
>> as it is a non-system directory that duplicates a system directory
>> #include "..." search starts here:
>> #include <...> search starts here:
>> .
>> kernel/include
>> /usr/local/include
>> /usr/lib/gcc-lib/i386-linux/3.2.3/include
>> /usr/include
>> /lib/modules/2.4.20-bigvideo-1/build/include
>
>
>
> As a fix I suggest:
>
> # diff -u Makefile.orig Makefile
> --- Makefile.orig 2003-03-19 18:20:38.000000000 +0100
> +++ Makefile 2003-03-19 18:21:08.000000000 +0100
> @@ -178,7 +178,7 @@
> # PROGCPPFLAGS/PROGCFLAGS is to create non-kernel object files (which are linked into executables).
> # ARCPPFLAGS/ARCFLAGS are used to create archive object files (static libraries).
> # LIBCPPFLAGS/LIBCFLAGS are for shared library objects.
> -ALL_CPPFLAGS := -I. -Ikernel/include -I$(I2C_HEADERS) -I$(LINUX_HEADERS)
> +ALL_CPPFLAGS := -I. -Ikernel/include -I$(I2C_HEADERS) -idirafter $(LINUX_HEADERS)
> ALL_CFLAGS := -O2
> ifeq ($(DEBUG),1)
>
>
>
> bye,
>
> -christian-
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1735 7894878c-1315-0410-8ee3-d5d059ff63e0
Set DESTDIR if you want to install at some other place then where you
will run everything from.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@675 7894878c-1315-0410-8ee3-d5d059ff63e0
default. Now uses libsensors. Ripped the display formatting code from
sensors (with some modification) but needless to say I've only tested
a single chip. Doesn't support alarms yet. With a bit of work, could
share the display formatting code with sensors so just one source needs
updating. Compiles on my machine.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@661 7894878c-1315-0410-8ee3-d5d059ff63e0
The Makefile now examine $(LINUX)/.config to see what modules need to be
compiled. It compiles only those modules which were either not configured
in at all, or were built as modules (ie. drivers which are built-in in the
kernel are not built, as they can not be overruled).
The above is still potentially dangerous, if we break the interface of
our modules. Still, it is much better than it was.
C
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@575 7894878c-1315-0410-8ee3-d5d059ff63e0
the kernel.
* <kernel/init.h> is now included for all modules
* Initialization-time only functions and variables are marked with __init
* EXPORT_SYMBOL or EXPORT_NO_SYMBOLS declarations added
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@513 7894878c-1315-0410-8ee3-d5d059ff63e0
* 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
These will help those unfortunate people who use Debian or other braindead
distributions which ship with non-matching kernel headers in directories
/usr/include/{linux,asm}. For 'normal' people, nothing needs to be changed.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@362 7894878c-1315-0410-8ee3-d5d059ff63e0
* Either Phil had not done a 'cvs update', or I forgot a 'cvs commit'; anyway,
the last changes to detect.pl have been ported to sensors-detect.
* Added a rule to the Makefile fragment to install it in $(SBINDIR).
* Added SBINDIR to the main Makefile.
* Deleted detect.pl
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@323 7894878c-1315-0410-8ee3-d5d059ff63e0