summaryrefslogtreecommitdiff
path: root/sofort/version.mk
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-29 13:58:33 -0400
committermidipix <writeonce@midipix.org>2016-10-31 14:57:14 -0400
commit8be3778f436d9e60d9e33bc7bbd07a1453ecd1f6 (patch)
tree9a521176bbe2505810f895b4ef6be15922585c24 /sofort/version.mk
parent5c577bdd1f6ecc2b76d125b5af69177467c8d2f3 (diff)
downloadbfirm-8be3778f436d9e60d9e33bc7bbd07a1453ecd1f6.tar.bz2
bfirm-8be3778f436d9e60d9e33bc7bbd07a1453ecd1f6.tar.xz
build system: created skeleton.
Diffstat (limited to 'sofort/version.mk')
-rw-r--r--sofort/version.mk63
1 files changed, 63 insertions, 0 deletions
diff --git a/sofort/version.mk b/sofort/version.mk
new file mode 100644
index 0000000..930a295
--- /dev/null
+++ b/sofort/version.mk
@@ -0,0 +1,63 @@
+include $(PROJECT_DIR)/project/tagver.mk
+
+CFLAGS_VERSION += -D$(VER_NAMESPACE)_TAG_VER_MAJOR=$(VER_MAJOR)
+CFLAGS_VERSION += -D$(VER_NAMESPACE)_TAG_VER_MINOR=$(VER_MINOR)
+CFLAGS_VERSION += -D$(VER_NAMESPACE)_TAG_VER_PATCH=$(VER_PATCH)
+
+ifeq ($(AVOID_VERSION),yes)
+
+VER_XYZ =
+VER_SONAME =
+
+package-shared-soname:
+package-shared-solink:
+package-install-soname:
+package-install-solink:
+
+else
+
+VER_XYZ = .$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
+VER_SONAME = .$(VER_MAJOR)
+
+package-shared-soname: shared-soname
+package-shared-solink: shared-solink
+package-install-soname: install-soname
+package-install-solink: install-solink
+
+
+
+# libfoo.so (common)
+install-solink: install-lib
+ rm -f $@.tmp
+ ln -s $(DSO_VER) $@.tmp
+ mv $@.tmp $(DESTDIR)$(LIBDIR)/$(DSO_SOLINK)
+
+$(SHARED_SOLINK): $(SHARED_LIB)
+ rm -f $@.tmp
+ ln -s $(DSO_VER) $@.tmp
+ mv $@.tmp $@
+
+# libfoo.so.x (symlink)
+ifeq ($(OS_SONAME),symlink)
+$(SHARED_SONAME): $(SHARED_LIB)
+ rm -f $@.tmp
+ ln -s $(DSO_VER) $@.tmp
+ mv $@.tmp $@
+
+install-soname: install-lib
+ rm -f $@.tmp
+ ln -s $(DSO_VER) $@.tmp
+ mv $@.tmp $(DESTDIR)$(LIBDIR)/$(DSO_SONAME)
+endif
+
+
+# libfoo.so.x (copy)
+ifeq ($(OS_SONAME),copy)
+install-soname: install-lib
+ cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)/$(DSO_SONAME)
+
+$(SHARED_SONAME): $(SHARED_LIB)
+ cp $(SHARED_LIB) $(SHARED_SONAME)
+endif
+
+endif