mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-06 15:51:34 +00:00
(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. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3096 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
85a0c8ccb2
commit
a116313d54
3 files changed
+39
-1
No files matched your search
+10
-1
@@ -49,7 +49,11 @@ 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 $(MODULE_DIR)/sysfs.c
|
||||
$(MODULE_DIR)/init.c
|
||||
ifdef SYSFS_SUPPORT
|
||||
LIBCSOURCES := $(LIBCSOURCES) $(MODULE_DIR)/sysfs.c
|
||||
endif
|
||||
|
||||
LIBOTHEROBJECTS := $(MODULE_DIR)/conf-parse.o $(MODULE_DIR)/conf-lex.o
|
||||
LIBSHOBJECTS := $(LIBCSOURCES:.c=.lo) $(LIBOTHEROBJECTS:.o=.lo)
|
||||
LIBSTOBJECTS := $(LIBCSOURCES:.c=.ao) $(LIBOTHEROBJECTS:.o=.ao)
|
||||
@@ -60,8 +64,13 @@ 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) $@
|
||||
|
||||
Reference in new issue
Block a user