chiark / gitweb /
keymap: move from udev-extras
[elogind.git] / libudev / Makefile.am
1 include $(top_srcdir)/Makefile.am.inc
2
3 SUBDIRS = \
4         docs
5
6 noinst_PROGRAMS = \
7         test-libudev
8
9 test_libudev_SOURCES = \
10         test-libudev.c
11
12 test_libudev_LDADD = \
13         libudev.la
14
15 rootlib_LTLIBRARIES = \
16         libudev.la
17
18 include_HEADERS =\
19         libudev.h
20
21 libudev_la_SOURCES =\
22         libudev-private.h \
23         libudev.c \
24         libudev-list.c \
25         libudev-util.c \
26         libudev-device.c \
27         libudev-enumerate.c \
28         libudev-monitor.c \
29         libudev-queue.c
30
31 LT_CURRENT=4
32 LT_REVISION=0
33 LT_AGE=4
34 libudev_la_LDFLAGS = \
35         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
36         -export-symbols $(top_srcdir)/libudev/exported_symbols
37
38 pkgconfigdir = $(libdir)/pkgconfig
39 pkgconfig_DATA = \
40         libudev.pc
41
42 EXTRA_DIST = \
43         exported_symbols
44
45 # move devel files from $(rootlibdir) to $(libdir) if needed
46 install-data-hook:
47         rm -f $(DESTDIR)$(rootlibdir)/libudev.la
48         if test "$(libdir)" != "$(rootlibdir)"; then \
49                 mkdir -p $(DESTDIR)$(rootlibdir); \
50                 so_img_name=$$(readlink $(DESTDIR)$(rootlibdir)/libudev.so); \
51                 rm $(DESTDIR)$(rootlibdir)/libudev.so; \
52                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
53                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so; \
54         fi
55
56 uninstall-hook:
57         rm -f $(DESTDIR)$(rootlibdir)/libudev.a
58         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*