blob: e9c7cc9236f75571a5c6c34a301f2305bc4fc9fb (
plain) (
blame)
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
|
include $(top_srcdir)/config/include-Makefile.am
AM_CPPFLAGS += -I$(ul_libmount_incdir) \
-I$(ul_libmount_srcdir) \
-I$(ul_libblkid_incdir)
# includes
mountincdir = $(includedir)/mount
nodist_mountinc_HEADERS = mount.h
usrlib_exec_LTLIBRARIES = libmount.la
libmount_la_SOURCES = $(mountinc_HEADERS)
nodist_libmount_la_SOURCES = mount.h version.c utils.c test.c init.c cache.c \
optstr.c \
$(top_srcdir)/lib/canonicalize.c
libmount_la_LIBADD = $(ul_libblkid_la)
libmount_la_DEPENDENCIES = $(libmount_la_LIBADD) mount.sym mount.h.in
libmount_la_LDFLAGS = -Wl,--version-script=$(ul_libmount_srcdir)/mount.sym \
-version-info $(LIBMOUNT_VERSION_INFO)
tests = test_version test_cache test_optstr
EXTRA_DIST = mount.sym mount.h.in
CLEANFILES = $(tests)
tests: all $(tests)
test_%: %.c
$(COMPILE) -DTEST_PROGRAM $< .libs/libmount.a -o $@ $(BLKID_LIBS)
# move lib from $(usrlib_execdir) to $(libdir) if needed
install-exec-hook:
if test "$(usrlib_execdir)" != "$(libdir)"; then \
mkdir -p $(DESTDIR)$(libdir); \
mv $(DESTDIR)$(usrlib_execdir)/libmount.so.* $(DESTDIR)$(libdir); \
so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libmount.so); \
so_img_rel_target=$$(echo $(usrlib_execdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
(cd $(DESTDIR)$(usrlib_execdir) && \
rm -f libmount.so && \
$(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libmount.so); \
fi
uninstall-hook:
rm -f $(DESTDIR)$(libdir)/libmount.so*
|