summaryrefslogtreecommitdiff
path: root/libudev/Makefile.am
blob: 866a5ca13525ffa01fc3072af9a3af4d16741b6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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*