Blame sofort/core/version.mk

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