summaryrefslogtreecommitdiff
path: root/exports
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-27 12:08:23 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-27 12:08:23 +0200
commit2cffe792d8070f37345056e8c88379aa8a2774fd (patch)
tree2b87d1c8b16dd3492b8123707b1f21a0306c7318 /exports
parent09ec69dfdef409868f1cb39cb8cc4b33c8690c9f (diff)
Version: Ensure that we load a specific one
Diffstat (limited to 'exports')
-rw-r--r--exports/Makefile2
-rw-r--r--exports/common.mk6
2 files changed, 6 insertions, 2 deletions
diff --git a/exports/Makefile b/exports/Makefile
index 1434f8b..6608ee0 100644
--- a/exports/Makefile
+++ b/exports/Makefile
@@ -18,7 +18,7 @@ endif
# This extra target prevents unnecessary rebuild
lib/$(GOOS)/$(GOARCH)/$(LIB_FILE): ..
CGO_ENABLED=1 go build -o $@ -buildmode=c-shared .
- mv lib/$(GOOS)/$(GOARCH)/$(LIB_PREFIX)$(LIB_NAME).h lib/$(GOOS)/$(GOARCH)/$(LIB_NAME).h || true # Normalize header name
+ mv lib/$(GOOS)/$(GOARCH)/$(LIB_PREFIX)$(LIB_NAME_VERSION).h lib/$(GOOS)/$(GOARCH)/$(LIB_NAME).h || true # Normalize header name
clean:
rm -rf ../exports/lib/*
diff --git a/exports/common.mk b/exports/common.mk
index c1e2a7e..c5386ae 100644
--- a/exports/common.mk
+++ b/exports/common.mk
@@ -18,10 +18,14 @@ LIB_PREFIX ?= lib
LIB_SUFFIX ?= .so
endif
+# Current version
+VERSION = 0.1.0
+
# Library name without prefixes/suffixes
LIB_NAME ?= eduvpn_common
+LIB_NAME_VERSION ?= $(LIB_NAME)-$(VERSION)
# Library file name
-LIB_FILE ?= $(LIB_PREFIX)$(LIB_NAME)$(LIB_SUFFIX)
+LIB_FILE ?= $(LIB_PREFIX)$(LIB_NAME_VERSION)$(LIB_SUFFIX)
# Get relative exports/ directory when included from a wrapper, without trailing slash
override EXPORTS_PATH = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))