1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
systemd/libudev/Makefile.am
Kay Sievers 871a36bd7e libudev: enumerate - sort with qsort()
On machines with many thousands of devices:
  $ time find /sys -name uevent | wc -l
  74876

  real      0m33.171s
  user      0m3.329s
  sys       0m29.719s

the current udevtrigger spends minutes sorting the device list:
  $ time /sbin/udevadm trigger --dry-run

  real      4m56.739s
  user      4m45.743s
  sys       0m7.862s

with qsort() it looks better:
  $ time udev/udevadm trigger --dry-run

  real      0m6.495s
  user      0m0.473s
  sys       0m5.923s
2009-07-08 02:04:49 +02:00

57 lines
1.2 KiB
Makefile

include $(top_srcdir)/Makefile.am.inc
SUBDIRS = \
docs
noinst_PROGRAMS = \
test-libudev
test_libudev_SOURCES = \
test-libudev.c
test_libudev_LDADD = \
libudev.la
lib_LTLIBRARIES = \
libudev.la
include_HEADERS =\
libudev.h
libudev_la_SOURCES =\
libudev-private.h \
libudev.c \
libudev-list.c \
libudev-util.c \
libudev-device.c \
libudev-enumerate.c \
libudev-monitor.c \
libudev-queue.c
LT_CURRENT=4
LT_REVISION=2
LT_AGE=4
libudev_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-symbols $(top_srcdir)/libudev/exported_symbols
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
libudev.pc
EXTRA_DIST = \
exported_symbols
# move lib from $(libdir) to $(rootlib_execdir) and update devel link, if needed
install-exec-hook:
if test "$(libdir)" != "$(rootlib_execdir)"; then \
mkdir -p $(DESTDIR)$(rootlib_execdir) && \
so_img_name=$$(readlink $(DESTDIR)$(libdir)/libudev.so) && \
so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
ln -sf $$so_img_rel_target_prefix$(rootlib_execdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so && \
mv $(DESTDIR)$(libdir)/libudev.so.* $(DESTDIR)$(rootlib_execdir); \
fi
uninstall-hook:
rm -f $(DESTDIR)$(rootlib_execdir)/libudev.so*