mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-06 15:51:34 +00:00
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
This commit is contained in:
1 parent
8b5ed619c0
commit
85393f35b6
4 files changed
+2
-28
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-9
@@ -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) $@
|
||||
|
||||
-10
@@ -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 */
|
||||
Reference in new issue
Block a user