chiark / gitweb /
build: add *exec* to the internal rootlibdir name
[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 lib_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=1
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 lib from $(libdir) to $(rootlib_execdir) and update devel link, if needed
46 install-exec-hook:
47         if test "$(libdir)" != "$(rootlib_execdir)"; then \
48                 mkdir -p $(DESTDIR)$(rootlib_execdir) && \
49                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libudev.so) && \
50                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
51                 ln -sf $$so_img_rel_target_prefix$(rootlib_execdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so && \
52                 mv $(DESTDIR)$(libdir)/libudev.so.* $(DESTDIR)$(rootlib_execdir); \
53         fi
54
55 uninstall-hook:
56         rm -f $(DESTDIR)$(rootlib_execdir)/libudev.so*