From 2cffe792d8070f37345056e8c88379aa8a2774fd Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Tue, 27 Sep 2022 12:08:23 +0200 Subject: Version: Ensure that we load a specific one --- exports/Makefile | 2 +- exports/common.mk | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'exports') 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)))) -- cgit v1.2.3