Blame sofort/core/version.mk

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