From 85393f35b6a441b2850246434e3ca90a58df25b5 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 25 Jun 2007 08:18:47 +0000 Subject: [PATCH] Always build libsensors with sysfs support. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4458 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + Makefile | 9 --------- lib/Module.mk | 10 +--------- lib/sysfs.h | 10 ---------- 4 files changed, 2 insertions(+), 28 deletions(-) diff --git a/CHANGES b/CHANGES index 9486b355..1af0af72 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,7 @@ SVN HEAD Library: Clean up pwm symbol names translation Add dme1737 support Delete support of non-sensor drivers (ddcmon, eeprom) + Always build with sysfs support Man page sensors.conf.5: Update the chip statement section Programs i2cdump, i2cget, i2cset: Do not force the slave address by default Program i2cdump: Use the new I2C block read function diff --git a/Makefile b/Makefile index 61a5b39e..df32bfcc 100644 --- a/Makefile +++ b/Makefile @@ -48,9 +48,6 @@ PREFIX := /usr/local # Your C compiler CC := gcc -# Build with sysfs support -SYSFS_SUPPORT := 1 - # This is the directory where sensors.conf will be installed, if no other # configuration file is found ETCDIR := /etc @@ -157,14 +154,8 @@ ALL_CFLAGS += $(CFLAGS) PROGCPPFLAGS := -DETCDIR="\"$(ETCDIR)\"" $(ALL_CPPFLAGS) -Wundef PROGCFLAGS := $(ALL_CFLAGS) ARCPPFLAGS := $(ALL_CPPFLAGS) -ifdef SYSFS_SUPPORT -ARCPPFLAGS := $(ARCPPFLAGS) -DSYSFS_SUPPORT -endif ARCFLAGS := $(ALL_CFLAGS) LIBCPPFLAGS := $(ALL_CPPFLAGS) -ifdef SYSFS_SUPPORT -LIBCPPFLAGS := $(LIBCPPFLAGS) -DSYSFS_SUPPORT -endif LIBCFLAGS := -fpic -D_REENTRANT $(ALL_CFLAGS) .PHONY: all user clean install user_install uninstall user_uninstall version package diff --git a/lib/Module.mk b/lib/Module.mk index dc51fb0a..f8cbdfe8 100644 --- a/lib/Module.mk +++ b/lib/Module.mk @@ -49,10 +49,7 @@ LIBTARGETS := $(MODULE_DIR)/$(LIBSTLIBNAME) $(MODULE_DIR)/$(LIBSHLIBNAME) \ LIBCSOURCES := $(MODULE_DIR)/data.c $(MODULE_DIR)/general.c \ $(MODULE_DIR)/error.c $(MODULE_DIR)/chips.c \ $(MODULE_DIR)/proc.c $(MODULE_DIR)/access.c \ - $(MODULE_DIR)/init.c -ifdef SYSFS_SUPPORT - LIBCSOURCES := $(LIBCSOURCES) $(MODULE_DIR)/sysfs.c -endif + $(MODULE_DIR)/init.c $(MODULE_DIR)/sysfs.c LIBOTHEROBJECTS := $(MODULE_DIR)/conf-parse.o $(MODULE_DIR)/conf-lex.o LIBSHOBJECTS := $(LIBCSOURCES:.c=.lo) $(LIBOTHEROBJECTS:.o=.lo) @@ -64,13 +61,8 @@ LIBHEADERFILES := $(MODULE_DIR)/error.h $(MODULE_DIR)/sensors.h \ $(MODULE_DIR)/chips.h # How to create the shared library -ifdef SYSFS_SUPPORT $(MODULE_DIR)/$(LIBSHLIBNAME): $(LIBSHOBJECTS) $(CC) -shared -Wl,-soname,$(LIBSHSONAME) -o $@ $^ -lc -lm -lsysfs -else -$(MODULE_DIR)/$(LIBSHLIBNAME): $(LIBSHOBJECTS) - $(CC) -shared -Wl,-soname,$(LIBSHSONAME) -o $@ $^ -lc -lm -endif $(MODULE_DIR)/$(LIBSHSONAME): $(MODULE_DIR)/$(LIBSHLIBNAME) $(RM) $@ diff --git a/lib/sysfs.h b/lib/sysfs.h index 351524d2..331307ad 100644 --- a/lib/sysfs.h +++ b/lib/sysfs.h @@ -20,7 +20,6 @@ #ifndef SENSORS_LIB_SYSFS_H #define SENSORS_LIB_SYSFS_H -#ifdef SYSFS_SUPPORT extern int sensors_found_sysfs; extern char sensors_sysfs_mount[]; @@ -31,13 +30,4 @@ extern int sensors_read_sysfs_chips(void); extern int sensors_read_sysfs_bus(void); -#else - -#define sensors_found_sysfs 0 -#define sensors_init_sysfs() 0 -#define sensors_read_sysfs_chips() (-1) -#define sensors_read_sysfs_bus() (-1) - -#endif - #endif /* !SENSORS_LIB_SYSFS_H */