diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-01-09 21:18:00 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-01-09 21:18:00 +0100 |
commit | 1aa1e24848903d11780db1ade355be73ad61a937 (patch) | |
tree | fb15c937a1a6e9f0197c905cc7af6ee5df8b108c /Makefile | |
parent | 47fbf3c58260e3fed1078061f8d45e01b0e120f0 (diff) |
replace libsysfs
We never used any of the libsysfs convenience features. Here we replace
it completely with 300 lines of code, which are much simpler and a bit
faster cause udev(d) does not open any syfs file for a simple event which
does not need any parent device information.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 4 insertions, 26 deletions
@@ -58,7 +58,6 @@ PROGRAMS = \ HEADERS = \ udev.h \ - udev_utils.h \ udev_rules.h \ logging.h \ udev_libc_wrapper.h \ @@ -66,12 +65,12 @@ HEADERS = \ list.h UDEV_OBJS = \ - udev_event.o \ udev_device.o \ udev_config.o \ udev_add.o \ udev_remove.o \ udev_db.o \ + udev_sysfs.o \ udev_rules.o \ udev_rules_parse.o \ udev_utils.o \ @@ -90,15 +89,6 @@ MAN_PAGES = \ udevinfo.8 \ udevstart.8 -SYSFS_OBJS = \ - libsysfs/sysfs_class.o \ - libsysfs/sysfs_device.o \ - libsysfs/sysfs_dir.o \ - libsysfs/sysfs_driver.o \ - libsysfs/sysfs_utils.o \ - libsysfs/dlist.o -LIBSYSFS = libsysfs/libsysfs.a - # config files automatically generated GEN_CONFIGS = \ $(LOCAL_CFG_DIR)/udev.conf @@ -144,10 +134,6 @@ LDFLAGS = -Wl,-warn-common OPTFLAGS = -Os CFLAGS += $(OPTFLAGS) -# include our local copy of libsysfs -CFLAGS += -I$(PWD)/libsysfs/sysfs \ - -I$(PWD)/libsysfs - ifeq ($(strip $(USE_LOG)),true) CFLAGS += -DUSE_LOG endif @@ -200,7 +186,6 @@ all: $(PROGRAMS) $(MAN_PAGES) STRIPCMD="$(STRIPCMD)" \ LIB_OBJS="$(LIB_OBJS)" \ LIBUDEV="$(PWD)/$(LIBUDEV)" \ - LIBSYSFS="$(PWD)/$(LIBSYSFS)" \ QUIET="$(QUIET)" \ -C $$target $@ || exit 1; \ done; @@ -211,28 +196,21 @@ all: $(PROGRAMS) $(MAN_PAGES) .SUFFIXES: # build the objects -%.o: %.c $(HOST_PROGS) $(GEN_HEADERS) +%.o: %.c $(HOST_PROGS) $(HEADERS) $(GEN_HEADERS) $(QUIET) $(CC) -c $(CFLAGS) $< -o $@ # "Static Pattern Rule" to build all programs -$(PROGRAMS): %: $(HOST_PROGS) $(HEADERS) $(GEN_HEADERS) $(LIBSYSFS) $(LIBUDEV) %.o - $(QUIET) $(LD) $(LDFLAGS) $@.o -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS) +$(PROGRAMS): %: $(HOST_PROGS) $(HEADERS) $(GEN_HEADERS) $(LIBUDEV) %.o + $(QUIET) $(LD) $(LDFLAGS) $@.o -o $@ $(LIBUDEV) $(LIB_OBJS) ifneq ($(STRIPCMD),) $(QUIET) $(STRIPCMD) $@ endif -$(UDEV_OBJS): $(LIBUDEV): $(HOST_PROGS) $(HEADERS) $(GEN_HEADERS) $(UDEV_OBJS) @rm -f $@ $(QUIET) $(AR) cq $@ $(UDEV_OBJS) $(QUIET) $(RANLIB) $@ -$(SYSFS_OBJS): -$(LIBSYSFS): $(HOST_PROGS) $(SYSFS_OBJS) - @rm -f $@ - $(QUIET) $(AR) cq $@ $(SYSFS_OBJS) - $(QUIET) $(RANLIB) $@ - # generate config files $(GEN_CONFIGS): sed -e "s:@udevdir@:$(udevdir):" -e "s:@configdir@:$(configdir):" < $@.in > $@ |