Changeset 3096
- Timestamp:
- 09/18/05 22:39:53 (3 years ago)
- Files:
-
- lm-sensors/trunk/Makefile (modified) (2 diffs)
- lm-sensors/trunk/lib/Module.mk (modified) (2 diffs)
- lm-sensors/trunk/lib/sysfs.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/Makefile
r3087 r3096 87 87 MODPREF := /lib/modules/$(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release |cut -f 2 -d'"') 88 88 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. 95 ifeq (,$(findstring /2.4., $(MODPREF))) 96 SYSFS_SUPPORT := 1 97 else 98 SYSFS_SUPPORT := 99 endif 100 #SYSFS_SUPPORT := 1 101 89 102 # Prevent 2.6+ users from using improper targets, as this won't work. 90 103 ifeq (,$(findstring /2.4., $(MODPREF))) … … 258 271 PROGCFLAGS := $(ALL_CFLAGS) 259 272 ARCPPFLAGS := $(ALL_CPPFLAGS) 273 ifdef SYSFS_SUPPORT 274 ARCPPFLAGS := $(ARCPPFLAGS) -DSYSFS_SUPPORT 275 endif 260 276 ARCFLAGS := $(ALL_CFLAGS) 261 277 LIBCPPFLAGS := $(ALL_CPPFLAGS) 278 ifdef SYSFS_SUPPORT 279 LIBCPPFLAGS := $(LIBCPPFLAGS) -DSYSFS_SUPPORT 280 endif 262 281 LIBCFLAGS := -fpic $(ALL_CFLAGS) 263 282 lm-sensors/trunk/lib/Module.mk
r3093 r3096 50 50 $(MODULE_DIR)/error.c $(MODULE_DIR)/chips.c \ 51 51 $(MODULE_DIR)/proc.c $(MODULE_DIR)/access.c \ 52 $(MODULE_DIR)/init.c $(MODULE_DIR)/sysfs.c 52 $(MODULE_DIR)/init.c 53 ifdef SYSFS_SUPPORT 54 LIBCSOURCES := $(LIBCSOURCES) $(MODULE_DIR)/sysfs.c 55 endif 56 53 57 LIBOTHEROBJECTS := $(MODULE_DIR)/conf-parse.o $(MODULE_DIR)/conf-lex.o 54 58 LIBSHOBJECTS := $(LIBCSOURCES:.c=.lo) $(LIBOTHEROBJECTS:.o=.lo) … … 61 65 62 66 # How to create the shared library 67 ifdef SYSFS_SUPPORT 63 68 $(MODULE_DIR)/$(LIBSHLIBNAME): $(LIBSHOBJECTS) 64 69 $(CC) -shared -Wl,-soname,$(LIBSHSONAME) -o $@ $^ -lc -lm -lsysfs 70 else 71 $(MODULE_DIR)/$(LIBSHLIBNAME): $(LIBSHOBJECTS) 72 $(CC) -shared -Wl,-soname,$(LIBSHSONAME) -o $@ $^ -lc -lm 73 endif 65 74 66 75 $(MODULE_DIR)/$(LIBSHSONAME): $(MODULE_DIR)/$(LIBSHLIBNAME) lm-sensors/trunk/lib/sysfs.h
r3095 r3096 21 21 #define SENSORS_LIB_SYSFS_H 22 22 23 #ifdef SYSFS_SUPPORT 23 24 extern int sensors_found_sysfs; 24 25 … … 31 32 extern int sensors_read_sysfs_bus(void); 32 33 34 #else 35 36 #define sensors_found_sysfs 0 37 #define sensors_init_sysfs() 38 #define sensors_read_sysfs_chips() (-1) 39 #define sensors_read_sysfs_bus() (-1) 40 41 #endif 42 33 43 #endif /* !SENSORS_LIB_SYSFS_H */
