diff options
| author | StevenWdV <stevenwdv@gmail.com> | 2022-01-24 14:59:25 +0100 |
|---|---|---|
| committer | StevenWdV <stevenwdv@gmail.com> | 2022-01-24 16:24:57 +0100 |
| commit | e544c6fa9e15e7277da79e2464243e90b2706b8c (patch) | |
| tree | de6613747e0e34a799089d4677f9833a85748712 /exports/platform.mk | |
| parent | aab2e4b966c82b67eb0e204060e5ea6cd4ea15cf (diff) | |
Cleanup
Added variables to Makefiles to specify custom exports/ directory;
Split exception classes in Java & C#;
Added more comments;
Renamed library and Go package;
Removed real (pure) tests;
Added generate_lib.ps1 to generate import .lib for Windows (Swift);
Moved built Go libraries to exports/lib/;
Switch to hopefully faster Swift GitHub Action.
Diffstat (limited to 'exports/platform.mk')
| -rw-r--r-- | exports/platform.mk | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/exports/platform.mk b/exports/platform.mk index d44c889..cd1248b 100644 --- a/exports/platform.mk +++ b/exports/platform.mk @@ -1,3 +1,5 @@ +# Prevent executing `go env ...` multiple times for the same property +# export is needed for this and also to pass the values on to the Go compiler ifndef GOOS export GOOS != go env GOHOSTOS endif @@ -16,9 +18,16 @@ LIB_PREFIX = lib LIB_SUFFIX = .so endif +# Library name without prefixes/suffixes +LIB_NAME = eduvpn_common +# Library file name +LIB_FILE = $(LIB_PREFIX)$(LIB_NAME)$(LIB_SUFFIX) + +# Get exports/ directory when included from a wrapper exports_dir = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) +# Add library to dynamic linker path for running tests ifeq (Windows_NT,$(OS)) -export PATH := $(exports_dir)/$(GOOS)/$(GOARCH):$(PATH) +export PATH := $(exports_dir)/lib/$(GOOS)/$(GOARCH):$(PATH) else -export LD_LIBRARY_PATH := $(exports_dir)/$(GOOS)/$(GOARCH):$(LD_LIBRARY_PATH) +export LD_LIBRARY_PATH := $(exports_dir)/lib/$(GOOS)/$(GOARCH):$(LD_LIBRARY_PATH) endif |
