summaryrefslogtreecommitdiff
path: root/wrappers/swift/Makefile
diff options
context:
space:
mode:
authorStevenWdV <stevenwdv@gmail.com>2021-12-17 15:21:53 +0100
committerStevenWdV <stevenwdv@gmail.com>2021-12-17 15:24:59 +0100
commita47513aeeb728b6316ba6765afdd7e5adbf4f2e3 (patch)
tree2ebb3a6936af606b0276f67d4cebb446d60cc610 /wrappers/swift/Makefile
parenta4d394a8794a254a102b8fa3bf311d4c59f9e9b5 (diff)
Add PHP wrapper, use header for right platform for PHP & Swift, simplify Swift Windows fix
Diffstat (limited to 'wrappers/swift/Makefile')
-rw-r--r--wrappers/swift/Makefile30
1 files changed, 13 insertions, 17 deletions
diff --git a/wrappers/swift/Makefile b/wrappers/swift/Makefile
index cf117f3..826dde3 100644
--- a/wrappers/swift/Makefile
+++ b/wrappers/swift/Makefile
@@ -5,27 +5,23 @@ GOOS != go env GOHOSTOS
GOARCH != go env GOHOSTARCH
ifeq (Windows_NT,$(OS))
-export PATH := $(PATH):$(abspath ../../exports/$(GOOS)/$(GOARCH))
+SWIFT = ./swift.cmd
+export PATH := $(abspath ../../exports/$(GOOS)/$(GOARCH)):$(PATH)
else
-export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(abspath ../../exports/$(GOOS)/$(GOARCH))
+SWIFT = swift
+export LD_LIBRARY_PATH := $(abspath ../../exports/$(GOOS)/$(GOARCH)):$(LD_LIBRARY_PATH)
endif
endif
-build:
- $(MAKE) -C ../../exports
-ifeq (Windows_NT,$(OS))
- "$(COMSPEC)" /c "\".\\fix-path.cmd & swift build --configuration release -Xlinker -L^\"../../exports/$(GOOS)/$(GOARCH)^\"\""
-else
- swift build --configuration release -Xlinker -L"../../exports/$(GOOS)/$(GOARCH)"
-endif
+build: .build_lib
+ $(SWIFT) build --configuration release -Xlinker -L"../../exports/$(GOOS)/$(GOARCH)"
-test:
- $(MAKE) -C ../../exports
-ifeq (Windows_NT,$(OS))
- "$(COMSPEC)" /c "\".\\fix-path.cmd & swift test --parallel -Xlinker -L^\"../../exports/$(GOOS)/$(GOARCH)^\"\""
-else
- swift test --parallel -Xlinker -L"../../exports/$(GOOS)/$(GOARCH)"
-endif
+test: .build_lib
+ $(SWIFT) test --parallel -Xlinker -L"../../exports/$(GOOS)/$(GOARCH)"
clean:
- rm -rf .build/
+ rm -rf .build/ CEduVpnCommon/Sources/CEduVpnCommon/Headers/*.h
+
+.build_lib:
+ $(MAKE) -C ../../exports
+ install "../../exports/$(GOOS)/$(GOARCH)/eduvpn_verify.h" -Dt CEduVpnCommon/Sources/CEduVpnCommon/Headers