diff options
| author | StevenWdV <stevenwdv@gmail.com> | 2021-11-29 01:20:06 +0100 |
|---|---|---|
| committer | StevenWdV <stevenwdv@gmail.com> | 2021-11-29 01:26:47 +0100 |
| commit | e4744fd94236944569bfed27af80a604b7668e4b (patch) | |
| tree | e360330d55706513395a27e6c85c7cdfca92ee68 /exports/Makefile | |
| parent | 4a293e0bba1f4c7f1069e5ea40fd0947185aaeea (diff) | |
Fix Java wrapper on Unix (append 'lib' prefix to library)
Diffstat (limited to 'exports/Makefile')
| -rw-r--r-- | exports/Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/exports/Makefile b/exports/Makefile index fdedba2..801692b 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -1,17 +1,22 @@ .PHONY: build clean +lib_prefix_linux = lib +lib_prefix_windows = +lib_prefix_darwin = lib + lib_suffix_linux = .so lib_suffix_windows = .dll lib_suffix_darwin = .dylib GOOS ?= $(shell go env GOHOSTOS) GOARCH ?= $(shell go env GOHOSTARCH) +LIB_PREFIX = $(lib_prefix_$(GOOS)) LIB_SUFFIX = $(lib_suffix_$(GOOS)) # Creates targets like 'linux/amd64/eduvpn_verify.so' -build: $(GOOS)/$(GOARCH)/eduvpn_verify$(LIB_SUFFIX) +build: $(GOOS)/$(GOARCH)/$(LIB_PREFIX)eduvpn_verify$(LIB_SUFFIX) -$(GOOS)/$(GOARCH)/eduvpn_verify$(LIB_SUFFIX): exports.go ../verify.go +$(GOOS)/$(GOARCH)/$(LIB_PREFIX)eduvpn_verify$(LIB_SUFFIX): exports.go ../verify.go CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $@ -buildmode=c-shared $< clean: |
