summaryrefslogtreecommitdiff
path: root/src/libudev/Makefile.am
blob: 953199beae3371147d685de38aba9c8bfc30f59b (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

LIBUDEV_CURRENT=7
LIBUDEV_REVISION=2
LIBUDEV_AGE=6

define move-to-rootlibdir
	if test "$(libdir)" != "$(rootlibdir)"; then \
		$(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
		so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
		so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
		$(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
		mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
	fi
endef

AM_CPPFLAGS = \
	-include $(top_builddir)/config.h \
	-DUDEV_CONF_FILE=\"$(udevconffile)\" \
	-DUDEV_HWDB_BIN=\"$(udevhwdbbin)\" \
	-DUDEV_VERSION=$(UDEV_VERSION) \
	-I $(top_srcdir)/src/shared

lib_LTLIBRARIES = \
	libudev.la

libudev_la_SOURCES =\
	libudev.sym \
	libudev-private.h \
	libudev.c \
	libudev-list.c \
	libudev-util.c \
	libudev-device.c \
	libudev-enumerate.c \
	libudev-monitor.c \
	libudev-queue.c \
	libudev-hwdb-def.h \
	libudev-hwdb.c

libudev_la_CFLAGS = \
	$(AM_CFLAGS) \
	-fvisibility=hidden

noinst_HEADERS = \
	libudev-hwdb-def.h \
	libudev-private.h

include_HEADERS = \
	libudev.h

libudev_la_LDFLAGS = \
	$(AM_LDFLAGS) \
	-version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
	-Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym

libudev_la_LIBADD = \
	$(top_builddir)/src/shared/libudev_shared.la \
	$(SELINUX_LIBS)

libudev_private_la_SOURCES = \
	$(libudev_la_SOURCES) \
	libudev-device-private.c

libudev_private_la_CFLAGS = \
	$(AM_CFLAGS) \
	-fvisibility=default

noinst_LTLIBRARIES = \
	libudev-private.la

pkgconfiglib_DATA = \
	libudev.pc

EXTRA_DIST = \
	libudev.pc.in \
	libudev.sym

CLEANFILES = \
	libudev.pc

install-exec-hook:
	libname=libudev.so && $(move-to-rootlibdir)

uninstall-hook:
	rm -f $(DESTDIR)$(rootlibdir)/libudev.so*