summaryrefslogtreecommitdiff
path: root/exports
diff options
context:
space:
mode:
Diffstat (limited to 'exports')
-rw-r--r--exports/Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/exports/Makefile b/exports/Makefile
index 912e930..fdedba2 100644
--- a/exports/Makefile
+++ b/exports/Makefile
@@ -4,15 +4,15 @@ lib_suffix_linux = .so
lib_suffix_windows = .dll
lib_suffix_darwin = .dylib
-OS = $(shell go env GOHOSTOS)
-ARCH = $(shell go env GOHOSTARCH)
-LIB_SUFFIX = $(lib_suffix_$(OS))
+GOOS ?= $(shell go env GOHOSTOS)
+GOARCH ?= $(shell go env GOHOSTARCH)
+LIB_SUFFIX = $(lib_suffix_$(GOOS))
# Creates targets like 'linux/amd64/eduvpn_verify.so'
-build: $(OS)/$(ARCH)/eduvpn_verify$(LIB_SUFFIX)
+build: $(GOOS)/$(GOARCH)/eduvpn_verify$(LIB_SUFFIX)
-$(OS)/$(ARCH)/eduvpn_verify$(LIB_SUFFIX): exports.go ../verify.go
- CGO_ENABLED=1 GOOS=$(OS) GOARCH=$(ARCH) go build -o $@ -buildmode=c-shared $<
+$(GOOS)/$(GOARCH)/eduvpn_verify$(LIB_SUFFIX): exports.go ../verify.go
+ CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $@ -buildmode=c-shared $<
clean:
rm -rf ../exports/*/