Blame sofort/core/version.mk

8077e8
# version.mk: handling of shared library versioning schemes.
8077e8
# this file is covered by COPYING.SOFORT.
8077e8
ffea9c
include $(PROJECT_DIR)/project/tagver.mk
ffea9c
ffea9c
CFLAGS_VERSION	+= -D$(VER_NAMESPACE)_TAG_VER_MAJOR=$(VER_MAJOR)
ffea9c
CFLAGS_VERSION	+= -D$(VER_NAMESPACE)_TAG_VER_MINOR=$(VER_MINOR)
ffea9c
CFLAGS_VERSION	+= -D$(VER_NAMESPACE)_TAG_VER_PATCH=$(VER_PATCH)
ffea9c
ffea9c
ifeq ($(AVOID_VERSION),yes)
ffea9c
ffea9c
VER_XYZ		=
ffea9c
VER_SONAME	=
ffea9c
ffea9c
package-shared-soname:
ffea9c
package-shared-solink:
ffea9c
package-install-soname:
ffea9c
package-install-solink:
ffea9c
ffea9c
else
ffea9c
ffea9c
VER_XYZ		= .$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
ffea9c
VER_SONAME	= .$(VER_MAJOR)
ffea9c
ffea9c
package-shared-soname:	shared-soname
ffea9c
package-shared-solink:	shared-solink
ffea9c
package-install-soname:	install-soname
ffea9c
package-install-solink:	install-solink
ffea9c
ffea9c
ffea9c
ffea9c
# libfoo.so (common)
ffea9c
install-solink:		install-lib
2bd1d7
			rm -f $(SHARED_SOLINK).tmp
2bd1d7
			ln -s $(DSO_VER) $(SHARED_SOLINK).tmp
2bd1d7
			mv $(SHARED_SOLINK).tmp $(DESTDIR)$(LIBDIR)/$(DSO_SOLINK)
ffea9c
ffea9c
$(SHARED_SOLINK):	$(SHARED_LIB)
ffea9c
			rm -f $@.tmp
ffea9c
			ln -s $(DSO_VER) $@.tmp
ffea9c
			mv $@.tmp $@
ffea9c
ffea9c
# libfoo.so.x (symlink)
ffea9c
ifeq ($(OS_SONAME),symlink)
ffea9c
$(SHARED_SONAME):	$(SHARED_LIB)
ffea9c
			rm -f $@.tmp
ffea9c
			ln -s $(DSO_VER) $@.tmp
ffea9c
			mv $@.tmp $@
ffea9c
ffea9c
install-soname:		install-lib
594652
			rm -f $(SHARED_SONAME).tmp
594652
			ln -s $(DSO_VER) $(SHARED_SONAME).tmp
594652
			mv $(SHARED_SONAME).tmp $(DESTDIR)$(LIBDIR)/$(DSO_SONAME)
ffea9c
endif
ffea9c
ffea9c
ffea9c
# libfoo.so.x (copy)
ffea9c
ifeq ($(OS_SONAME),copy)
ffea9c
install-soname:		install-lib
ffea9c
			cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)/$(DSO_SONAME)
ffea9c
ffea9c
$(SHARED_SONAME):	$(SHARED_LIB)
ffea9c
			cp $(SHARED_LIB) $(SHARED_SONAME)
ffea9c
endif
ffea9c
ffea9c
endif