bigbiff | 7b4c7a6 | 2015-01-01 19:44:14 -0500 | [diff] [blame] | 1 | |
| 2 | check_PROGRAMS += test_uuid |
| 3 | test_uuid_SOURCES = libuuid/src/test_uuid.c |
| 4 | test_uuid_LDADD = libuuid.la $(SOCKET_LIBS) |
| 5 | test_uuid_CFLAGS = -I$(ul_libuuid_incdir) |
| 6 | |
| 7 | # includes |
| 8 | uuidincdir = $(includedir)/uuid |
| 9 | uuidinc_HEADERS = libuuid/src/uuid.h |
| 10 | |
| 11 | usrlib_exec_LTLIBRARIES += libuuid.la |
| 12 | |
| 13 | libuuid_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 | |
| 30 | libuuid_la_DEPENDENCIES = libuuid/src/libuuid.sym |
| 31 | libuuid_la_LIBADD = $(SOCKET_LIBS) |
| 32 | |
| 33 | libuuid_la_CFLAGS = \ |
| 34 | $(SOLIB_CFLAGS) \ |
| 35 | -I$(ul_libuuid_incdir) \ |
| 36 | -Ilibuuid/src |
| 37 | |
| 38 | libuuid_la_LDFLAGS = \ |
| 39 | $(SOLIB_LDFLAGS) \ |
| 40 | -Wl,--version-script=$(top_srcdir)/libuuid/src/libuuid.sym \ |
| 41 | -version-info $(LIBUUID_VERSION_INFO) |
| 42 | |
| 43 | EXTRA_DIST += libuuid/src/libuuid.sym |
| 44 | |
| 45 | # move lib from $(usrlib_execdir) to $(libdir) if needed |
| 46 | install-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 | |
| 57 | uninstall-hook-libuuid: |
| 58 | rm -f $(DESTDIR)$(libdir)/libuuid.so* |
| 59 | |
| 60 | INSTALL_EXEC_HOOKS += install-exec-hook-libuuid |
| 61 | UNINSTALL_HOOKS += uninstall-hook-libuuid |