From 6af932539fa86669ce7b3cb0c2eaf8d92bae2e26 Mon Sep 17 00:00:00 2001 From: mananth Date: Wed, 7 Jan 2004 06:52:48 +0000 Subject: Add additional CFLAGS to build --- ChangeLog | 3 + Makefile.in | 2 +- aclocal.m4 | 78 ++++++++++++++++++++ cmd/Makefile.am | 1 + cmd/Makefile.in | 2 +- cmd/lsbus.c | 31 ++++---- cmd/systool.c | 47 +++++------- compile | 99 ++++++++++++++++++++++++++ configure | 20 ++++-- lib/Makefile.am | 4 +- lib/Makefile.in | 169 +++++++++++++++++++++++++++++++++++++++----- lib/sysfs.h | 2 - lib/sysfs_device.c | 2 +- lib/sysfs_dir.c | 2 +- test/Makefile.am | 2 + test/Makefile.in | 2 +- test/get_bus_devices_list.c | 2 +- test/get_class_dev.c | 2 +- test/get_device.c | 2 +- test/get_driver.c | 3 +- test/write_attr.c | 3 +- 21 files changed, 396 insertions(+), 82 deletions(-) create mode 100644 compile diff --git a/ChangeLog b/ChangeLog index 826de98..6a12181 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ +01/07/2003 - Ananth Mavinakayanahalli + * Added additional CFLAGS for building lib and apps + 01/07/2003 - Ananth Mavinakayanahalli * Added numerous "refresh" functions * Added funtion to remove trailing slash from paths diff --git a/Makefile.in b/Makefile.in index 7853834..eb05d57 100644 --- a/Makefile.in +++ b/Makefile.in @@ -104,7 +104,7 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ install-exec-recursive installdirs-recursive install-recursive \ uninstall-recursive check-recursive installcheck-recursive DIST_COMMON = README $(include_HEADERS) AUTHORS COPYING ChangeLog \ - INSTALL Makefile.am Makefile.in NEWS TODO aclocal.m4 \ + INSTALL Makefile.am Makefile.in NEWS TODO aclocal.m4 compile \ config.guess config.h.in config.sub configure configure.ac \ depcomp install-sh ltmain.sh missing mkinstalldirs DIST_SUBDIRS = $(SUBDIRS) diff --git a/aclocal.m4 b/aclocal.m4 index b73a11f..bf9ed34 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -756,6 +756,84 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]) fi])]) +# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- + +# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +AC_PREREQ([2.52]) + +# serial 6 + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. We must strip everything past the first ":", +# and everything past the last "/". + +# _AM_DIRNAME(PATH) +# ----------------- +# Like AS_DIRNAME, only do it during macro expansion +AC_DEFUN([_AM_DIRNAME], + [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, + m4_if(regexp([$1], [^//\([^/]\|$\)]), -1, + m4_if(regexp([$1], [^/.*]), -1, + [.], + patsubst([$1], [^\(/\).*], [\1])), + patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), + patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl +])# _AM_DIRNAME + + +# The stamp files are numbered to have different names. +# We could number them on a directory basis, but that's additional +# complications, let's have a unique counter. +m4_define([_AM_STAMP_Count], [0]) + + +# _AM_STAMP(HEADER) +# ----------------- +# The name of the stamp file for HEADER. +AC_DEFUN([_AM_STAMP], +[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl +AS_ESCAPE(_AM_DIRNAME(patsubst([$1], + [:.*])))/stamp-h[]_AM_STAMP_Count]) + + +# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS) +# ------------------------------------------------------------ +# We used to try to get a real timestamp in stamp-h. But the fear is that +# that will cause unnecessary cvs conflicts. +AC_DEFUN([_AM_CONFIG_HEADER], +[# Add the stamp file to the list of files AC keeps track of, +# along with our hook. +AC_CONFIG_HEADERS([$1], + [# update the timestamp +echo 'timestamp for $1' >"_AM_STAMP([$1])" +$2], + [$3]) +])# _AM_CONFIG_HEADER + + +# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS) +# -------------------------------------------------------------- +AC_DEFUN([AM_CONFIG_HEADER], +[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])]) +])# AM_CONFIG_HEADER + # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- # serial 46 AC_PROG_LIBTOOL diff --git a/cmd/Makefile.am b/cmd/Makefile.am index 10a8255..816b510 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -3,4 +3,5 @@ systool_SOURCES = systool.c names.c names.h lsbus_SOURCES = lsbus.c names.c names.h INCLUDES = -I../include LDADD = ../lib/libsysfs.la +CFLAGS = -Wall -Wshadow -W -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 3dceb6f..c998b4f 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -88,6 +88,7 @@ systool_SOURCES = systool.c names.c names.h lsbus_SOURCES = lsbus.c names.c names.h INCLUDES = -I../include LDADD = ../lib/libsysfs.la +CFLAGS = -Wall -Wshadow -W -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls subdir = cmd mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h @@ -122,7 +123,6 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -CFLAGS = @CFLAGS@ DIST_SOURCES = $(lsbus_SOURCES) $(systool_SOURCES) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(lsbus_SOURCES) $(systool_SOURCES) diff --git a/cmd/lsbus.c b/cmd/lsbus.c index 2cbe334..75d484c 100644 --- a/cmd/lsbus.c +++ b/cmd/lsbus.c @@ -68,16 +68,10 @@ static unsigned int get_pciconfig_word(int offset, unsigned char *buf) return val; } -static unsigned char get_pciconfig_byte(int offset, unsigned char *buf) -{ - return((unsigned char)buf[offset]); -} - - /** * usage: prints utility usage. */ -void usage(void) +static void usage(void) { fprintf(stdout, "Usage: lsbus [ bus [device]]\n"); fprintf(stdout, "\t-a\t\t\tShow attributes\n"); @@ -92,7 +86,7 @@ void usage(void) * remove_end_newline: removes newline on the end of an attribute value * @value: string to remove newline from */ -void remove_end_newline(unsigned char *value) +static void remove_end_newline(unsigned char *value) { unsigned char *p = value + (strlen(value) - 1); @@ -105,7 +99,7 @@ void remove_end_newline(unsigned char *value) * @attr: attribute to check. * returns 1 if binary or 0 if not. */ -int isbinaryvalue(struct sysfs_attribute *attr) +static int isbinaryvalue(struct sysfs_attribute *attr) { int i; @@ -123,7 +117,7 @@ int isbinaryvalue(struct sysfs_attribute *attr) * print_attribute_value: prints out single attribute value. * @attr: attricute to print. */ -void print_attribute_value(struct sysfs_attribute *attr) +static void print_attribute_value(struct sysfs_attribute *attr) { if (attr == NULL) return; @@ -155,7 +149,7 @@ void print_attribute_value(struct sysfs_attribute *attr) * print_attribute: prints out a single attribute * @attr: attribute to print. */ -void print_attribute(struct sysfs_attribute *attr) +static void print_attribute(struct sysfs_attribute *attr) { if (attr == NULL) return; @@ -181,7 +175,7 @@ void print_attribute(struct sysfs_attribute *attr) * print_device_attributes: prints out device attributes. * @sdir: print this device's attributes/files. */ -void print_device_attributes(struct dlist *attributes) +static void print_device_attributes(struct dlist *attributes) { struct sysfs_attribute *cur = NULL;; @@ -196,7 +190,7 @@ void print_device_attributes(struct dlist *attributes) * print_device: prints out device information. * @device: device to print. */ -void print_device(struct sysfs_device *device) +static void print_device(struct sysfs_device *device) { struct dlist *attributes = NULL; unsigned int vendor_id, device_id; @@ -240,7 +234,7 @@ void print_device(struct sysfs_device *device) * print_driver_attributes: prints out driver attributes . * @driver: print this driver's attributes. */ -void print_driver_attributes(struct sysfs_driver *driver) +static void print_driver_attributes(struct sysfs_driver *driver) { struct dlist *attributes = NULL; @@ -262,7 +256,7 @@ void print_driver_attributes(struct sysfs_driver *driver) * print_driver: prints out driver information. * @driver: driver to print. */ -void print_driver(struct sysfs_driver *driver) +static void print_driver(struct sysfs_driver *driver) { struct dlist *devlist = NULL; @@ -287,7 +281,7 @@ void print_driver(struct sysfs_driver *driver) * @busname: bus to print. * returns 0 with success or 1 with error. */ -int print_sysfs_bus(unsigned char *busname) +static int print_sysfs_bus(unsigned char *busname) { struct sysfs_bus *bus = NULL; struct sysfs_device *curdev = NULL; @@ -338,7 +332,7 @@ int print_sysfs_bus(unsigned char *busname) * @buses: list of supported system buses. * returns 0 with success or 1 with error. */ -int print_sysfs_buses(void) +static int print_sysfs_buses(void) { unsigned char subsys[SYSFS_NAME_LEN]; struct dlist *list = NULL; @@ -364,8 +358,7 @@ int main(int argc, char *argv[]) //unsigned char *bus_to_print = NULL; int retval = 0; int opt; - extern int optind; - extern char *optarg; + /*pci ids*/ unsigned char *pci_id_file = "/usr/local/share/pci.ids"; diff --git a/cmd/systool.c b/cmd/systool.c index 54b9c95..89d6feb 100644 --- a/cmd/systool.c +++ b/cmd/systool.c @@ -68,16 +68,10 @@ static unsigned int get_pciconfig_word(int offset, unsigned char *buf) return val; } -static unsigned char get_pciconfig_byte(int offset, unsigned char *buf) -{ - return((unsigned char)buf[offset]); -} - - /** * usage: prints utility usage. */ -void usage(void) +static void usage(void) { fprintf(stdout, "Usage: systool [ [device]]\n"); fprintf(stdout, "\t-a\t\t\tShow attributes\n"); @@ -97,7 +91,7 @@ void usage(void) * level passed in. * @level: number of spaces to indent. */ -void indent(int level) +static void indent(int level) { int i; @@ -109,7 +103,7 @@ void indent(int level) * remove_end_newline: removes newline on the end of an attribute value * @value: string to remove newline from */ -void remove_end_newline(unsigned char *value) +static void remove_end_newline(unsigned char *value) { unsigned char *p = value + (strlen(value) - 1); @@ -121,7 +115,7 @@ void remove_end_newline(unsigned char *value) * show_device_children: prints out device subdirs. * @children: dlist of child devices. */ -void show_device_children(struct dlist *children, int level) +static void show_device_children(struct dlist *children, int level) { struct sysfs_device *child = NULL; @@ -141,7 +135,7 @@ void show_device_children(struct dlist *children, int level) * @attr: attribute to check. * returns 1 if binary, 0 if not. */ -int isbinaryvalue(struct sysfs_attribute *attr) +static int isbinaryvalue(struct sysfs_attribute *attr) { int i; @@ -159,7 +153,7 @@ int isbinaryvalue(struct sysfs_attribute *attr) * show_attribute_value: prints out single attribute value. * @attr: attricute to print. */ -void show_attribute_value(struct sysfs_attribute *attr, int level) +static void show_attribute_value(struct sysfs_attribute *attr, int level) { if (attr == NULL) return; @@ -193,7 +187,7 @@ void show_attribute_value(struct sysfs_attribute *attr, int level) * show_attribute: prints out a single attribute * @attr: attribute to print. */ -void show_attribute(struct sysfs_attribute *attr, int level) +static void show_attribute(struct sysfs_attribute *attr, int level) { if (attr == NULL) return; @@ -221,7 +215,7 @@ void show_attribute(struct sysfs_attribute *attr, int level) * show_attributes: prints out a list of attributes. * @attributes: print this dlist of attributes/files. */ -void show_attributes(struct dlist *attributes, int level) +static void show_attributes(struct dlist *attributes, int level) { if (attributes != NULL) { struct sysfs_attribute *cur = NULL; @@ -239,7 +233,7 @@ void show_attributes(struct dlist *attributes, int level) * show_device: prints out device information. * @device: device to print. */ -void show_device(struct sysfs_device *device, int level) +static void show_device(struct sysfs_device *device, int level) { struct dlist *attributes = NULL; unsigned int vendor_id, device_id; @@ -288,7 +282,7 @@ void show_device(struct sysfs_device *device, int level) * show_root_device: prints out sys/devices device information. * @device: device to print. */ -void show_root_device(struct sysfs_device *device, int level) +static void show_root_device(struct sysfs_device *device, int level) { if (device != NULL) { indent(level); @@ -307,7 +301,7 @@ void show_root_device(struct sysfs_device *device, int level) * show_driver_attributes: prints out driver attributes . * @driver: print this driver's attributes. */ -void show_driver_attributes(struct sysfs_driver *driver, int level) +static void show_driver_attributes(struct sysfs_driver *driver, int level) { if (driver != NULL) { struct dlist *attributes = NULL; @@ -330,7 +324,7 @@ void show_driver_attributes(struct sysfs_driver *driver, int level) * show_driver: prints out driver information. * @driver: driver to print. */ -void show_driver(struct sysfs_driver *driver, int level) +static void show_driver(struct sysfs_driver *driver, int level) { struct dlist *devlist = NULL; @@ -359,7 +353,7 @@ void show_driver(struct sysfs_driver *driver, int level) * show_device_tree: prints out device tree. * @root: root device */ -void show_device_tree(struct sysfs_device *root, int level) +static void show_device_tree(struct sysfs_device *root, int level) { if (root != NULL) { struct sysfs_device *cur = NULL; @@ -382,7 +376,7 @@ void show_device_tree(struct sysfs_device *root, int level) * @busname: bus to print. * returns 0 with success or 1 with error. */ -int show_sysfs_bus(unsigned char *busname) +static int show_sysfs_bus(unsigned char *busname) { struct sysfs_bus *bus = NULL; struct sysfs_device *curdev = NULL; @@ -433,7 +427,7 @@ int show_sysfs_bus(unsigned char *busname) * show_class_device: prints out class device. * @dev: class device to print. */ -void show_class_device(struct sysfs_class_device *dev, int level) +static void show_class_device(struct sysfs_class_device *dev, int level) { struct dlist *attributes = NULL; struct sysfs_device *device = NULL; @@ -466,7 +460,7 @@ void show_class_device(struct sysfs_class_device *dev, int level) * @classname: class to print. * returns 0 with success and 1 with error. */ -int show_sysfs_class(unsigned char *classname) +static int show_sysfs_class(unsigned char *classname) { struct sysfs_class *cls = NULL; struct sysfs_class_device *cur = NULL; @@ -503,12 +497,11 @@ int show_sysfs_class(unsigned char *classname) * @rootname: device root to print. * returns 0 with success and 1 with error. */ -int show_sysfs_root(unsigned char *rootname) +static int show_sysfs_root(unsigned char *rootname) { struct sysfs_root_device *root = NULL; struct sysfs_device *device = NULL; struct dlist *devlist = NULL; - unsigned char path[SYSFS_PATH_MAX]; if (rootname == NULL) { errno = EINVAL; @@ -541,12 +534,12 @@ int show_sysfs_root(unsigned char *rootname) * supported by sysfs. * returns 0 with success or 1 with error. */ -int show_default_info(void) +static int show_default_info(void) { unsigned char subsys[SYSFS_NAME_LEN]; struct dlist *list = NULL; unsigned char *cur = NULL; - int retval = 0, i; + int retval = 0; strcpy(subsys, SYSFS_BUS_NAME); list = sysfs_open_subsystem_list(subsys); @@ -586,8 +579,6 @@ int main(int argc, char *argv[]) unsigned char *show_root = NULL; int retval = 0; int opt; - extern int optind; - extern char *optarg; unsigned char *pci_id_file = "/usr/local/share/pci.ids"; while((opt = getopt(argc, argv, cmd_options)) != EOF) { diff --git a/compile b/compile new file mode 100644 index 0000000..9bb997a --- /dev/null +++ b/compile @@ -0,0 +1,99 @@ +#! /bin/sh + +# Wrapper for compilers which do not understand `-c -o'. + +# Copyright 1999, 2000 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Usage: +# compile PROGRAM [ARGS]... +# `-o FOO.o' is removed from the args passed to the actual compile. + +prog=$1 +shift + +ofile= +cfile= +args= +while test $# -gt 0; do + case "$1" in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we do something ugly here. + ofile=$2 + shift + case "$ofile" in + *.o | *.obj) + ;; + *) + args="$args -o $ofile" + ofile= + ;; + esac + ;; + *.c) + cfile=$1 + args="$args $1" + ;; + *) + args="$args $1" + ;; + esac + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$prog" $args +fi + +# Name of file we expect compiler to create. +cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` + +# Create the lock directory. +# Note: use `[/.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d +while true; do + if mkdir $lockdir > /dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir $lockdir; exit 1" 1 2 15 + +# Run the compile. +"$prog" $args +status=$? + +if test -f "$cofile"; then + mv "$cofile" "$ofile" +fi + +rmdir $lockdir +exit $status diff --git a/configure b/configure index aa1d052..dc0d19a 100755 --- a/configure +++ b/configure @@ -1756,8 +1756,12 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +# Add the stamp file to the list of files AC keeps track of, +# along with our hook. ac_config_headers="$ac_config_headers config.h" + + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -4167,7 +4171,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4170 "configure"' > conftest.$ac_ext + echo '#line 4174 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4703,7 +4707,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6496,7 +6500,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 echo $ECHO_N "checking for sysfs_read_directory in -lsysfs... $ECHO_C" >&6 @@ -10618,6 +10622,12 @@ done; } cat $tmp/config.h rm -f $tmp/config.h fi + # Run the commands associated with the file. + case $ac_file in + config.h ) # update the timestamp +echo 'timestamp for config.h' >"./stamp-h1" + ;; + esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF diff --git a/lib/Makefile.am b/lib/Makefile.am index 4527f0a..396e9bd 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2,5 +2,5 @@ lib_LTLIBRARIES = libsysfs.la libsysfs_la_SOURCES = sysfs_utils.c sysfs_dir.c sysfs_bus.c sysfs_class.c \ sysfs_device.c sysfs_driver.c sysfs.h dlist.c INCLUDES = -I../include -libsysfs_la_LDFLAGS = -version-info 0:4:0 - +libsysfs_la_LDFLAGS = -version-info 1:0:0 +libsysfs_la_CFLAGS = -Wall -W -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls diff --git a/lib/Makefile.in b/lib/Makefile.in index f218756..df2b893 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -88,7 +88,8 @@ libsysfs_la_SOURCES = sysfs_utils.c sysfs_dir.c sysfs_bus.c sysfs_class.c \ sysfs_device.c sysfs_driver.c sysfs.h dlist.c INCLUDES = -I../include -libsysfs_la_LDFLAGS = -version-info 0:4:0 +libsysfs_la_LDFLAGS = -version-info 1:0:0 +libsysfs_la_CFLAGS = -Wall -W -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls subdir = lib mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h @@ -96,8 +97,10 @@ CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) libsysfs_la_LIBADD = -am_libsysfs_la_OBJECTS = sysfs_utils.lo sysfs_dir.lo sysfs_bus.lo \ - sysfs_class.lo sysfs_device.lo sysfs_driver.lo dlist.lo +am_libsysfs_la_OBJECTS = libsysfs_la-sysfs_utils.lo \ + libsysfs_la-sysfs_dir.lo libsysfs_la-sysfs_bus.lo \ + libsysfs_la-sysfs_class.lo libsysfs_la-sysfs_device.lo \ + libsysfs_la-sysfs_driver.lo libsysfs_la-dlist.lo libsysfs_la_OBJECTS = $(am_libsysfs_la_OBJECTS) DEFS = @DEFS@ @@ -107,12 +110,13 @@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dlist.Plo ./$(DEPDIR)/sysfs_bus.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/sysfs_class.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/sysfs_device.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/sysfs_dir.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/sysfs_driver.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/sysfs_utils.Plo +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libsysfs_la-dlist.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/libsysfs_la-sysfs_bus.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/libsysfs_la-sysfs_class.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/libsysfs_la-sysfs_device.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/libsysfs_la-sysfs_dir.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/libsysfs_la-sysfs_driver.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/libsysfs_la-sysfs_utils.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ @@ -162,6 +166,13 @@ clean-libLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done +libsysfs_la-sysfs_utils.lo: sysfs_utils.c +libsysfs_la-sysfs_dir.lo: sysfs_dir.c +libsysfs_la-sysfs_bus.lo: sysfs_bus.c +libsysfs_la-sysfs_class.lo: sysfs_class.c +libsysfs_la-sysfs_device.lo: sysfs_device.c +libsysfs_la-sysfs_driver.lo: sysfs_driver.c +libsysfs_la-dlist.lo: dlist.c libsysfs.la: $(libsysfs_la_OBJECTS) $(libsysfs_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libsysfs_la_LDFLAGS) $(libsysfs_la_OBJECTS) $(libsysfs_la_LIBADD) $(LIBS) @@ -171,13 +182,13 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlist.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysfs_bus.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysfs_class.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysfs_device.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysfs_dir.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysfs_driver.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysfs_utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsysfs_la-dlist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsysfs_la-sysfs_bus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsysfs_la-sysfs_class.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsysfs_la-sysfs_device.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsysfs_la-sysfs_dir.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsysfs_la-sysfs_driver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsysfs_la-sysfs_utils.Plo@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) @@ -199,6 +210,132 @@ distclean-depend: @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + +libsysfs_la-sysfs_utils.o: sysfs_utils.c +@AMDEP_TRUE@ source='sysfs_utils.c' object='libsysfs_la-sysfs_utils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_utils.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_utils.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_utils.o `test -f 'sysfs_utils.c' || echo '$(srcdir)/'`sysfs_utils.c + +libsysfs_la-sysfs_utils.obj: sysfs_utils.c +@AMDEP_TRUE@ source='sysfs_utils.c' object='libsysfs_la-sysfs_utils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_utils.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_utils.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_utils.obj `cygpath -w sysfs_utils.c` + +libsysfs_la-sysfs_utils.lo: sysfs_utils.c +@AMDEP_TRUE@ source='sysfs_utils.c' object='libsysfs_la-sysfs_utils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_utils.Plo' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_utils.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_utils.lo `test -f 'sysfs_utils.c' || echo '$(srcdir)/'`sysfs_utils.c + +libsysfs_la-sysfs_dir.o: sysfs_dir.c +@AMDEP_TRUE@ source='sysfs_dir.c' object='libsysfs_la-sysfs_dir.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_dir.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_dir.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_dir.o `test -f 'sysfs_dir.c' || echo '$(srcdir)/'`sysfs_dir.c + +libsysfs_la-sysfs_dir.obj: sysfs_dir.c +@AMDEP_TRUE@ source='sysfs_dir.c' object='libsysfs_la-sysfs_dir.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_dir.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_dir.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_dir.obj `cygpath -w sysfs_dir.c` + +libsysfs_la-sysfs_dir.lo: sysfs_dir.c +@AMDEP_TRUE@ source='sysfs_dir.c' object='libsysfs_la-sysfs_dir.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_dir.Plo' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_dir.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_dir.lo `test -f 'sysfs_dir.c' || echo '$(srcdir)/'`sysfs_dir.c + +libsysfs_la-sysfs_bus.o: sysfs_bus.c +@AMDEP_TRUE@ source='sysfs_bus.c' object='libsysfs_la-sysfs_bus.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_bus.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_bus.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_bus.o `test -f 'sysfs_bus.c' || echo '$(srcdir)/'`sysfs_bus.c + +libsysfs_la-sysfs_bus.obj: sysfs_bus.c +@AMDEP_TRUE@ source='sysfs_bus.c' object='libsysfs_la-sysfs_bus.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_bus.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_bus.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_bus.obj `cygpath -w sysfs_bus.c` + +libsysfs_la-sysfs_bus.lo: sysfs_bus.c +@AMDEP_TRUE@ source='sysfs_bus.c' object='libsysfs_la-sysfs_bus.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_bus.Plo' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_bus.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_bus.lo `test -f 'sysfs_bus.c' || echo '$(srcdir)/'`sysfs_bus.c + +libsysfs_la-sysfs_class.o: sysfs_class.c +@AMDEP_TRUE@ source='sysfs_class.c' object='libsysfs_la-sysfs_class.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_class.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_class.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_class.o `test -f 'sysfs_class.c' || echo '$(srcdir)/'`sysfs_class.c + +libsysfs_la-sysfs_class.obj: sysfs_class.c +@AMDEP_TRUE@ source='sysfs_class.c' object='libsysfs_la-sysfs_class.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_class.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_class.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_class.obj `cygpath -w sysfs_class.c` + +libsysfs_la-sysfs_class.lo: sysfs_class.c +@AMDEP_TRUE@ source='sysfs_class.c' object='libsysfs_la-sysfs_class.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_class.Plo' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_class.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_class.lo `test -f 'sysfs_class.c' || echo '$(srcdir)/'`sysfs_class.c + +libsysfs_la-sysfs_device.o: sysfs_device.c +@AMDEP_TRUE@ source='sysfs_device.c' object='libsysfs_la-sysfs_device.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_device.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_device.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_device.o `test -f 'sysfs_device.c' || echo '$(srcdir)/'`sysfs_device.c + +libsysfs_la-sysfs_device.obj: sysfs_device.c +@AMDEP_TRUE@ source='sysfs_device.c' object='libsysfs_la-sysfs_device.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_device.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_device.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_device.obj `cygpath -w sysfs_device.c` + +libsysfs_la-sysfs_device.lo: sysfs_device.c +@AMDEP_TRUE@ source='sysfs_device.c' object='libsysfs_la-sysfs_device.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_device.Plo' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_device.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_device.lo `test -f 'sysfs_device.c' || echo '$(srcdir)/'`sysfs_device.c + +libsysfs_la-sysfs_driver.o: sysfs_driver.c +@AMDEP_TRUE@ source='sysfs_driver.c' object='libsysfs_la-sysfs_driver.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_driver.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_driver.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_driver.o `test -f 'sysfs_driver.c' || echo '$(srcdir)/'`sysfs_driver.c + +libsysfs_la-sysfs_driver.obj: sysfs_driver.c +@AMDEP_TRUE@ source='sysfs_driver.c' object='libsysfs_la-sysfs_driver.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_driver.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_driver.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_driver.obj `cygpath -w sysfs_driver.c` + +libsysfs_la-sysfs_driver.lo: sysfs_driver.c +@AMDEP_TRUE@ source='sysfs_driver.c' object='libsysfs_la-sysfs_driver.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-sysfs_driver.Plo' tmpdepfile='$(DEPDIR)/libsysfs_la-sysfs_driver.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-sysfs_driver.lo `test -f 'sysfs_driver.c' || echo '$(srcdir)/'`sysfs_driver.c + +libsysfs_la-dlist.o: dlist.c +@AMDEP_TRUE@ source='dlist.c' object='libsysfs_la-dlist.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-dlist.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-dlist.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-dlist.o `test -f 'dlist.c' || echo '$(srcdir)/'`dlist.c + +libsysfs_la-dlist.obj: dlist.c +@AMDEP_TRUE@ source='dlist.c' object='libsysfs_la-dlist.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-dlist.Po' tmpdepfile='$(DEPDIR)/libsysfs_la-dlist.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-dlist.obj `cygpath -w dlist.c` + +libsysfs_la-dlist.lo: dlist.c +@AMDEP_TRUE@ source='dlist.c' object='libsysfs_la-dlist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/libsysfs_la-dlist.Plo' tmpdepfile='$(DEPDIR)/libsysfs_la-dlist.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsysfs_la_CFLAGS) $(CFLAGS) -c -o libsysfs_la-dlist.lo `test -f 'dlist.c' || echo '$(srcdir)/'`dlist.c CCDEPMODE = @CCDEPMODE@ mostlyclean-libtool: diff --git a/lib/sysfs.h b/lib/sysfs.h index e4c148c..4ef8c28 100644 --- a/lib/sysfs.h +++ b/lib/sysfs.h @@ -34,8 +34,6 @@ #include /* external library functions */ -extern int lstat(const char *file_name, struct stat *buf); -extern int readlink(const char *path, char *buf, size_t bufsize); extern int isascii(int c); /* Debugging */ diff --git a/lib/sysfs_device.c b/lib/sysfs_device.c index bee3294..e58526f 100644 --- a/lib/sysfs_device.c +++ b/lib/sysfs_device.c @@ -472,7 +472,7 @@ static int get_device_absolute_path(const unsigned char *device, * We now are at /sys/bus/"bus_name"/devices/"device" which is a link. * Now read this link to reach to the device. */ - if ((sysfs_get_link(bus_path, path, SYSFS_PATH_MAX)) != 0) { + if ((sysfs_get_link(bus_path, path, psize)) != 0) { dprintf("Error getting to device %s\n", device); return -1; } diff --git a/lib/sysfs_dir.c b/lib/sysfs_dir.c index fe4c71c..94fd933 100644 --- a/lib/sysfs_dir.c +++ b/lib/sysfs_dir.c @@ -215,7 +215,7 @@ int sysfs_write_attribute(struct sysfs_attribute *sysattr, sysattr->name); close(fd); return -1; - } else if (length != len) { + } else if ((unsigned int)length != len) { dprintf("Could not write %d bytes to attribute %s\n", len, sysattr->name); /* diff --git a/test/Makefile.am b/test/Makefile.am index 0cc3ca1..09181f4 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -9,3 +9,5 @@ write_attr_SOURCES = write_attr.c get_classdev_parent_SOURCES = get_classdev_parent.c INCLUDES = -I../include LDADD = ../lib/libsysfs.la +CFLAGS = -Wall -Wshadow -W -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls + diff --git a/test/Makefile.in b/test/Makefile.in index 8d1b7c4..92873ce 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -95,6 +95,7 @@ write_attr_SOURCES = write_attr.c get_classdev_parent_SOURCES = get_classdev_parent.c INCLUDES = -I../include LDADD = ../lib/libsysfs.la +CFLAGS = -Wall -Wshadow -W -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls subdir = test mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h @@ -161,7 +162,6 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -CFLAGS = @CFLAGS@ DIST_SOURCES = $(dlist_test_SOURCES) $(get_bus_devices_list_SOURCES) \ $(get_class_dev_SOURCES) $(get_classdev_parent_SOURCES) \ $(get_device_SOURCES) $(get_driver_SOURCES) \ diff --git a/test/get_bus_devices_list.c b/test/get_bus_devices_list.c index 213e46f..c471f8d 100644 --- a/test/get_bus_devices_list.c +++ b/test/get_bus_devices_list.c @@ -25,7 +25,7 @@ #include "libsysfs.h" -void print_usage(void) +static void print_usage(void) { fprintf(stdout, "Usage: get_bus_devices_list [bus]\n"); } diff --git a/test/get_class_dev.c b/test/get_class_dev.c index 81a0aeb..d52a2bc 100644 --- a/test/get_class_dev.c +++ b/test/get_class_dev.c @@ -25,7 +25,7 @@ #include "libsysfs.h" -void print_usage(void) +static void print_usage(void) { fprintf(stdout, "Usage: get_class_dev [class name] [class_device]\n"); } diff --git a/test/get_device.c b/test/get_device.c index 6b5bd36..9b2545a 100644 --- a/test/get_device.c +++ b/test/get_device.c @@ -25,7 +25,7 @@ #include "libsysfs.h" -void print_usage(void) +static void print_usage(void) { fprintf(stdout, "Usage: get_device [bus] [device]\n"); } diff --git a/test/get_driver.c b/test/get_driver.c index db02be6..0a808a6 100644 --- a/test/get_driver.c +++ b/test/get_driver.c @@ -22,10 +22,11 @@ #include #include +#include #include "libsysfs.h" -void print_usage(void) +static void print_usage(void) { fprintf(stdout, "Usage: get_driver [driver]\n"); } diff --git a/test/write_attr.c b/test/write_attr.c index 25a10c5..5c28c7a 100644 --- a/test/write_attr.c +++ b/test/write_attr.c @@ -22,10 +22,11 @@ #include #include +#include #include "libsysfs.h" -void print_usage(void) +static void print_usage(void) { fprintf(stdout, "Usage: write_attr [classname] [device] [attribute] [new_value]\n"); } -- cgit v1.2.1