]> git.ipfire.org Git - thirdparty/util-linux.git/blob - libuuid/src/Makefile.am
build-sys: enhance readability of the autotools files
[thirdparty/util-linux.git] / libuuid / src / Makefile.am
1 include $(top_srcdir)/config/include-Makefile.am
2
3 AM_CPPFLAGS += -I$(ul_libuuid_srcdir)
4
5 noinst_PROGRAMS = tst_uuid
6 tst_uuid_LDADD = libuuid.la $(SOCKET_LIBS) #$(ul_libuuid_la)
7
8 # includes
9 uuidincdir = $(includedir)/uuid
10 uuidinc_HEADERS = uuid.h
11
12 usrlib_exec_LTLIBRARIES = libuuid.la
13
14 libuuid_la_SOURCES = \
15 clear.c \
16 compare.c \
17 copy.c \
18 gen_uuid.c \
19 isnull.c \
20 pack.c \
21 parse.c \
22 unpack.c \
23 unparse.c \
24 uuidd.h \
25 uuidd.h \
26 uuidP.h \
27 uuid_time.c \
28 $(uuidinc_HEADERS)
29
30 libuuid_la_DEPENDENCIES = uuid.sym
31
32 libuuid_la_LIBADD = $(SOCKET_LIBS)
33
34 libuuid_la_LDFLAGS = -Wl,--version-script=$(ul_libuuid_srcdir)/uuid.sym \
35 -version-info $(LIBUUID_VERSION_INFO)
36
37 EXTRA_DIST = uuid.sym gen_uuid_nt.c
38
39 # move lib from $(usrlib_execdir) to $(libdir) if needed
40 install-exec-hook:
41 if test "$(usrlib_execdir)" != "$(libdir)"; then \
42 mkdir -p $(DESTDIR)$(libdir); \
43 mv $(DESTDIR)$(usrlib_execdir)/libuuid.so.* $(DESTDIR)$(libdir); \
44 so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libuuid.so); \
45 so_img_rel_target=$$(echo $(usrlib_execdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
46 (cd $(DESTDIR)$(usrlib_execdir) && \
47 rm -f libuuid.so && \
48 $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libuuid.so); \
49 fi
50
51 uninstall-hook:
52 rm -f $(DESTDIR)$(libdir)/libuuid.so*