Blame sofort/core/version.mk

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