chiark / gitweb /
delete vol_id and require util-linux-ng's blkid
[elogind.git] / extras / volume_id / lib / Makefile.am
index 592b390987040fa92ef55e6587f1910394e304cd..d5fd6560f1a0247bf9d8e478b37237c6c0a38d63 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/Makefile.am.inc
+
 rootlibdir = $(exec_prefix)/$(libdir_name)
 rootlib_LTLIBRARIES = \
        libvolume_id.la
@@ -6,6 +8,11 @@ include_HEADERS =\
        libvolume_id.h
 
 libvolume_id_la_SOURCES =\
+       libvolume_id-private.h \
+       volume_id.c \
+       util.c \
+       md5.h \
+       md5.c \
        ext.c \
        fat.c \
        hfs.c \
@@ -41,9 +48,7 @@ libvolume_id_la_SOURCES =\
        squashfs.c \
        netware.c \
        oracleasm.c \
-       volume_id.c \
-       util.h \
-       util.c
+       btrfs.c
 
 libvolume_id_la_LDFLAGS = \
        -version-info $(VOLID_LT_CURRENT):$(VOLID_LT_REVISION):$(VOLID_LT_AGE) \
@@ -55,8 +60,10 @@ install-data-hook:
        if test "$(prefix)" != "$(exec_prefix)"; then \
                mkdir -p $(DESTDIR)$(prefix)/$(libdir_name); \
                mv $(DESTDIR)$(rootlibdir)/libvolume_id.a $(DESTDIR)$(prefix)/$(libdir_name)/; \
+               so_img_name=$$(readlink $(DESTDIR)$(rootlibdir)/libvolume_id.so); \
                rm $(DESTDIR)$(rootlibdir)/libvolume_id.so; \
-               ln -sf $(rootlibdir)/libvolume_id.so.$(VOLID_LT_CURRENT).$(VOLID_LT_AGE).$(VOLID_LT_REVISION) \
+               so_img_rel_target_prefix=$$(echo $(prefix)/$(libdir_name) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
+               ln -sf  $$so_img_rel_target_prefix$(exec_prefix)/$(libdir_name)/$$so_img_name \
                        $(DESTDIR)$(prefix)/$(libdir_name)/libvolume_id.so; \
        fi
 
@@ -65,6 +72,3 @@ EXTRA_DIST = \
 
 pkgconfigdir = $(prefix)/$(libdir_name)/pkgconfig
 pkgconfig_DATA = libvolume_id.pc
-
-distclean-local:
-       rm -f Makefile.in