blob: 061aff21d641d8d7ca19c65f4dc7a847acc2060d [file] [log] [blame]
bigbiff7b4c7a62015-01-01 19:44:14 -05001
2check_PROGRAMS += test_uuid
3test_uuid_SOURCES = libuuid/src/test_uuid.c
4test_uuid_LDADD = libuuid.la $(SOCKET_LIBS)
5test_uuid_CFLAGS = -I$(ul_libuuid_incdir)
6
7# includes
8uuidincdir = $(includedir)/uuid
9uuidinc_HEADERS = libuuid/src/uuid.h
10
11usrlib_exec_LTLIBRARIES += libuuid.la
12
13libuuid_la_SOURCES = \
14 libuuid/src/clear.c \
15 libuuid/src/compare.c \
16 libuuid/src/copy.c \
17 libuuid/src/gen_uuid.c \
18 libuuid/src/isnull.c \
19 libuuid/src/pack.c \
20 libuuid/src/parse.c \
21 libuuid/src/unpack.c \
22 libuuid/src/unparse.c \
23 libuuid/src/uuidd.h \
24 libuuid/src/uuidd.h \
25 libuuid/src/uuidP.h \
26 libuuid/src/uuid_time.c \
27 $(uuidinc_HEADERS) \
28 lib/randutils.c
29
30libuuid_la_DEPENDENCIES = libuuid/src/libuuid.sym
31libuuid_la_LIBADD = $(SOCKET_LIBS)
32
33libuuid_la_CFLAGS = \
34 $(SOLIB_CFLAGS) \
35 -I$(ul_libuuid_incdir) \
36 -Ilibuuid/src
37
38libuuid_la_LDFLAGS = \
39 $(SOLIB_LDFLAGS) \
40 -Wl,--version-script=$(top_srcdir)/libuuid/src/libuuid.sym \
41 -version-info $(LIBUUID_VERSION_INFO)
42
43EXTRA_DIST += libuuid/src/libuuid.sym
44
45# move lib from $(usrlib_execdir) to $(libdir) if needed
46install-exec-hook-libuuid:
47 if test "$(usrlib_execdir)" != "$(libdir)" -a -f "$(DESTDIR)$(usrlib_execdir)/libuuid.so"; then \
48 mkdir -p $(DESTDIR)$(libdir); \
49 mv $(DESTDIR)$(usrlib_execdir)/libuuid.so.* $(DESTDIR)$(libdir); \
50 so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libuuid.so); \
51 so_img_rel_target=$$(echo $(usrlib_execdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
52 (cd $(DESTDIR)$(usrlib_execdir) && \
53 rm -f libuuid.so && \
54 $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libuuid.so); \
55 fi
56
57uninstall-hook-libuuid:
58 rm -f $(DESTDIR)$(libdir)/libuuid.so*
59
60INSTALL_EXEC_HOOKS += install-exec-hook-libuuid
61UNINSTALL_HOOKS += uninstall-hook-libuuid