chiark / gitweb /
libudev: libudev.pc add Libs.private
[elogind.git] / extras / volume_id / lib / Makefile.am
index 592b390987040fa92ef55e6587f1910394e304cd..c5198aba9a2b069f21f13721894c80139d205da3 100644 (file)
@@ -6,6 +6,12 @@ include_HEADERS =\
        libvolume_id.h
 
 libvolume_id_la_SOURCES =\
+       libvolume_id-private.h \
+       volume_id.c \
+       util.h \
+       util.c \
+       md5.h \
+       md5.c \
        ext.c \
        fat.c \
        hfs.c \
@@ -40,10 +46,7 @@ libvolume_id_la_SOURCES =\
        vxfs.c \
        squashfs.c \
        netware.c \
-       oracleasm.c \
-       volume_id.c \
-       util.h \
-       util.c
+       oracleasm.c
 
 libvolume_id_la_LDFLAGS = \
        -version-info $(VOLID_LT_CURRENT):$(VOLID_LT_REVISION):$(VOLID_LT_AGE) \
@@ -55,8 +58,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