summaryrefslogtreecommitdiff
path: root/wrappers/swift/Makefile
blob: 84b3cc1e4ae962a9a33210cddfa56a15f1a5f049 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.PHONY: build test clean

ifneq (clean,$(MAKECMDGOALS))
include ../../exports/platform.mk

ifeq (Windows_NT,$(OS))
SWIFT = ./swift.cmd
else
SWIFT = swift
endif
endif

build: .build_lib
	$(SWIFT) build --configuration release -Xlinker -L"../../exports/$(GOOS)/$(GOARCH)"

test: .build_lib
	$(SWIFT) test --parallel -Xlinker -L"../../exports/$(GOOS)/$(GOARCH)"

clean:
	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