Blame sofort/core/version.mk

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