Show
Ignore:
Timestamp:
09/18/05 22:39:53 (9 years ago)
Author:
mmh
Message:

(mmh)
This patch makes optional the sysfs support in libsensors. The default is to
*disable* sysfs support if a 2.4.x kernel is detected, for all other versions,
support will be enabled. This can be overridden in the top-level Makefile.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/Makefile

    r3087 r3096  
    8787MODPREF := /lib/modules/$(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release |cut -f 2 -d'"') 
    8888 
     89# When building userspace for use with 2.4.x series kernels, we turn off 
     90# sysfs support by default.  You can override this (e.g. if you want 
     91# to build binaries that work for both 2.4.x, and 2.6.x and above) 
     92# by uncommenting the line after the next endif.  Keep in mind, if and only 
     93# if you do this: you will need to install the libsysfs libraries on your 
     94# kernel 2.4.x systems also. 
     95ifeq (,$(findstring /2.4., $(MODPREF))) 
     96        SYSFS_SUPPORT := 1 
     97else 
     98        SYSFS_SUPPORT := 
     99endif 
     100#SYSFS_SUPPORT := 1 
     101 
    89102# Prevent 2.6+ users from using improper targets, as this won't work. 
    90103ifeq (,$(findstring /2.4., $(MODPREF))) 
     
    258271PROGCFLAGS := $(ALL_CFLAGS) 
    259272ARCPPFLAGS := $(ALL_CPPFLAGS) 
     273ifdef SYSFS_SUPPORT 
     274ARCPPFLAGS := $(ARCPPFLAGS) -DSYSFS_SUPPORT 
     275endif 
    260276ARCFLAGS := $(ALL_CFLAGS) 
    261277LIBCPPFLAGS := $(ALL_CPPFLAGS) 
     278ifdef SYSFS_SUPPORT 
     279LIBCPPFLAGS := $(LIBCPPFLAGS) -DSYSFS_SUPPORT 
     280endif 
    262281LIBCFLAGS := -fpic $(ALL_CFLAGS) 
    263282