Blame sofort/core/version.mk

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