summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am246
1 files changed, 239 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index bcc2f3b920..b18ac91f00 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,18 +1,14 @@
include $(top_srcdir)/Makefile.am.inc
-SUBDIRS = \
- docs \
- libudev \
- udev \
- rules \
- extras
+SUBDIRS = . libudev/docs
udevconfdir = $(sysconfdir)/udev
dist_udevconf_DATA = \
udev.conf
EXTRA_DIST = \
- autogen.sh
+ autogen.sh \
+ libudev/exported_symbols
CLEANFILES = \
udev-$(VERSION).tar.gz udev-$(VERSION).tar.bz2
@@ -64,3 +60,239 @@ git-release:
doc-sync:
rsync -av --delete libudev/docs/html/ master.kernel.org:/pub/linux/utils/kernel/hotplug/libudev/
rsync -av --delete extras/gudev/docs/html/ master.kernel.org:/pub/linux/utils/kernel/hotplug/gudev/
+
+include_HEADERS = libudev/libudev.h
+
+# ------------------------------------------------------------------------------
+# Libraries
+# ------------------------------------------------------------------------------
+lib_LTLIBRARIES = libudev/libudev.la
+
+libudev_libudev_la_SOURCES =\
+ libudev/libudev-private.h \
+ libudev/libudev.c \
+ libudev/libudev-list.c \
+ libudev/libudev-util.c \
+ libudev/libudev-device.c \
+ libudev/libudev-enumerate.c \
+ libudev/libudev-monitor.c \
+ libudev/libudev-queue.c
+
+LIBUDEV_CURRENT=5
+LIBUDEV_REVISION=0
+LIBUDEV_AGE=5
+libudev_libudev_la_LDFLAGS = \
+ -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
+ -export-symbols $(top_srcdir)/libudev/exported_symbols
+
+noinst_LTLIBRARIES = \
+ libudev/libudev-private.la
+
+libudev_libudev_private_la_SOURCES =\
+ $(libudev_libudev_la_SOURCES) \
+ libudev/libudev-ctrl.c \
+ libudev/libudev-util-private.c \
+ libudev/libudev-device-private.c \
+ libudev/libudev-queue-private.c
+
+libudev_libudev_private_la_LIBADD =
+
+# ------------------------------------------------------------------------------
+# Programs
+# ------------------------------------------------------------------------------
+
+sbin_PROGRAMS = \
+ udev/udevd \
+ udev/udevadm
+
+udev_common_sources =\
+ udev/udev.h \
+ udev/udev-event.c \
+ udev/udev-watch.c \
+ udev/udev-node.c \
+ udev/udev-rules.c
+udev_common_libs = libudev/libudev-private.la
+
+udev_udevd_SOURCES = \
+ $(udev_common_sources) \
+ udev/udevd.c
+
+udev_udevd_LDADD = $(udev_common_libs)
+
+udev_udevadm_SOURCES = \
+ $(udev_common_sources) \
+ udev/udevadm.c \
+ udev/udevadm-info.c \
+ udev/udevadm-control.c \
+ udev/udevadm-test.c \
+ udev/udevadm-monitor.c \
+ udev/udevadm-settle.c \
+ udev/udevadm-trigger.c
+
+udev_udevadm_LDADD = $(udev_common_libs)
+
+libexec_PROGRAMS = \
+ extras/ata_id/ata_id \
+ extras/cdrom_id/cdrom_id \
+ extras/collect/collect \
+ extras/edd_id/edd_id \
+ extras/floppy/create_floppy_devices \
+ extras/path_id/path_id \
+ extras/fstab_import/fstab_import \
+ extras/scsi_id/scsi_id \
+ extras/usb_id/usb_id \
+ extras/v4l_id/v4l_id
+
+dist_libexec_SCRIPTS = \
+ extras/firmware/firmware.sh \
+ extras/rule_generator/write_cd_rules \
+ extras/rule_generator/write_net_rules
+
+udevhomedir = $(libexecdir)
+dist_udevhome_DATA = \
+ extras/rule_generator/rule_generator.functions
+
+extras_ata_id_ata_id_SOURCES = extras/ata_id/ata_id.c
+extras_ata_id_ata_id_LDADD = libudev/libudev-private.la
+
+extras_cdrom_id_cdrom_id_SOURCES = extras/cdrom_id/cdrom_id.c
+extras_cdrom_id_cdrom_id_LDADD = libudev/libudev-private.la
+
+extras_collect_collect_SOURCES = extras/collect/collect.c
+extras_collect_collect_LDADD = libudev/libudev-private.la
+
+extras_edd_id_edd_id_SOURCES = extras/edd_id/edd_id.c
+extras_edd_id_edd_id_LDADD = libudev/libudev-private.la
+
+extras_floppy_create_floppy_devices_SOURCES = extras/floppy/create_floppy_devices.c
+extras_floppy_create_floppy_devices_LDADD = libudev/libudev-private.la
+
+extras_path_id_path_id_SOURCES = extras/path_id/path_id.c
+extras_path_id_path_id_LDADD = libudev/libudev-private.la
+
+extras_fstab_import_fstab_import_SOURCES = extras/fstab_import/fstab_import.c
+extras_fstab_import_fstab_import_LDADD = libudev/libudev-private.la
+
+extras_scsi_id_scsi_id_SOURCES =\
+ extras/scsi_id/scsi_id.c \
+ extras/scsi_id/scsi_serial.c \
+ extras/scsi_id/scsi.h \
+ extras/scsi_id/scsi_id.h \
+ extras/scsi_id/bsg.h
+extras_scsi_id_scsi_id_LDADD = libudev/libudev-private.la
+
+extras_usb_id_usb_id_SOURCES = extras/usb_id/usb_id.c
+extras_usb_id_usb_id_LDADD = libudev/libudev-private.la
+
+extras_v4l_id_v4l_id_SOURCES = extras/v4l_id/v4l_id.c
+extras_v4l_id_v4l_id_LDADD = libudev/libudev-private.la
+
+# ------------------------------------------------------------------------------
+# Tests
+# ------------------------------------------------------------------------------
+check_PROGRAMS = \
+ libudev/test-libudev \
+ udev/test-udev
+
+libudev_test_libudev_SOURCES = libudev/test-libudev.c
+libudev_test_libudev_LDADD = libudev/libudev.la
+
+udev_test_udev_SOURCES = \
+ $(udev_common_sources) \
+ udev/test-udev.c
+udev_test_udev_LDADD = $(udev_common_libs)
+
+# ------------------------------------------------------------------------------
+# Basic rules
+# ------------------------------------------------------------------------------
+
+dist_udevrules_DATA = \
+ rules/rules.d/50-udev-default.rules \
+ rules/rules.d/60-persistent-storage.rules \
+ rules/rules.d/60-persistent-storage-tape.rules \
+ rules/rules.d/60-persistent-serial.rules \
+ rules/rules.d/60-persistent-input.rules \
+ rules/rules.d/60-persistent-alsa.rules \
+ rules/rules.d/80-drivers.rules \
+ rules/rules.d/95-udev-late.rules \
+ extras/rule_generator/75-cd-aliases-generator.rules \
+ extras/rule_generator/75-persistent-net-generator.rules \
+ extras/cdrom_id/60-cdrom_id.rules \
+ extras/edd_id/61-persistent-storage-edd.rules \
+ extras/firmware/50-firmware.rules \
+ extras/fstab_import/79-fstab_import.rules \
+ extras/v4l_id/60-persistent-v4l.rules
+
+EXTRA_DIST += \
+ rules/packages \
+ rules/redhat \
+ rules/suse \
+ rules/gentoo
+
+# ------------------------------------------------------------------------------
+# Conditionals (SElinux, etc…)
+# ------------------------------------------------------------------------------
+if WITH_SELINUX
+libudev_libudev_private_la_SOURCES += \
+ libudev/libudev-selinux-private.c
+libudev_libudev_private_la_LIBADD += \
+ $(SELINUX_LIBS)
+endif
+
+if ENABLE_EXTRAS
+dist_udevrules_DATA += \
+ rules/rules.d/75-net-description.rules \
+ rules/rules.d/75-tty-description.rules \
+ rules/rules.d/78-sound-card.rules
+
+SUBDIRS += \
+ extras/udev-acl \
+ extras/usb-db \
+ extras/hid2hci \
+ extras/keymap \
+ extras/modem-modeswitch \
+ extras/gudev
+endif
+
+# ------------------------------------------------------------------------------
+# Pkg-config, docs and man pages
+# ------------------------------------------------------------------------------
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = \
+ libudev/libudev.pc \
+ udev/udev.pc
+
+writing_udev_rulesdir = $(docdir)/writing_udev_rules
+dist_writing_udev_rules_DATA = \
+ docs/writing_udev_rules/index.html
+
+dist_man_MANS = \
+ udev/udev.7 \
+ udev/udevadm.8 \
+ udev/udevd.8 \
+ extras/scsi_id/scsi_id.8
+
+EXTRA_DIST += \
+ udev/udev.xml \
+ udev/udevadm.xml \
+ udev/udevd.xml
+
+%.7 %.8 : %.xml
+ $(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+# ------------------------------------------------------------------------------
+# Install and uninstall hooks
+# ------------------------------------------------------------------------------
+# 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*
+