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 /wrappers/swift/Makefile | |
| 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 'wrappers/swift/Makefile')
| -rw-r--r-- | wrappers/swift/Makefile | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/wrappers/swift/Makefile b/wrappers/swift/Makefile index 84b3cc1..b46a177 100644 --- a/wrappers/swift/Makefile +++ b/wrappers/swift/Makefile @@ -1,24 +1,33 @@ -.PHONY: build test clean +.PHONY: build test install-header clean -ifneq (clean,$(MAKECMDGOALS)) -include ../../exports/platform.mk +EXPORTS_PATH ?= ../../exports +EXPORTS_LIB_PATH ?= $(EXPORTS_PATH)/lib -ifeq (Windows_NT,$(OS)) +ifneq ($(MAKECMDGOALS),clean) +include $(EXPORTS_PATH)/platform.mk + +LIB_DIR = $(EXPORTS_LIB_PATH)/$(GOOS)/$(GOARCH) + +ifeq ($(OS),Windows_NT) SWIFT = ./swift.cmd else SWIFT = swift endif endif -build: .build_lib - $(SWIFT) build --configuration release -Xlinker -L"../../exports/$(GOOS)/$(GOARCH)" +build: install-header + $(SWIFT) build --configuration release -Xlinker -L"$(LIB_DIR)" + +test: install-header + $(SWIFT) test --parallel -Xlinker -L"$(LIB_DIR)" -test: .build_lib - $(SWIFT) test --parallel -Xlinker -L"../../exports/$(GOOS)/$(GOARCH)" +install-header: +ifneq ($(EXPORTS_PATH),) +ifneq ($(wildcard $(EXPORTS_PATH)/Makefile),) + $(MAKE) -C "$(EXPORTS_PATH)" +endif +endif + install "$(LIB_DIR)/$(LIB_NAME).h" -Dt CEduVpnCommon/Sources/CEduVpnCommon/Headers # Copy header for modulemap 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 |
