diff options
Diffstat (limited to 'wrappers/swift/Makefile')
| -rw-r--r-- | wrappers/swift/Makefile | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/wrappers/swift/Makefile b/wrappers/swift/Makefile index b46a177..6dca0ef 100644 --- a/wrappers/swift/Makefile +++ b/wrappers/swift/Makefile @@ -1,33 +1,22 @@ .PHONY: build test install-header clean EXPORTS_PATH ?= ../../exports -EXPORTS_LIB_PATH ?= $(EXPORTS_PATH)/lib - -ifneq ($(MAKECMDGOALS),clean) -include $(EXPORTS_PATH)/platform.mk - -LIB_DIR = $(EXPORTS_LIB_PATH)/$(GOOS)/$(GOARCH) +include $(EXPORTS_PATH)/common.mk ifeq ($(OS),Windows_NT) SWIFT = ./swift.cmd else SWIFT = swift endif -endif build: install-header - $(SWIFT) build --configuration release -Xlinker -L"$(LIB_DIR)" + $(SWIFT) build --configuration release -Xlinker -L"$(EXPORTS_LIB_SUBFOLDER_PATH)" test: install-header - $(SWIFT) test --parallel -Xlinker -L"$(LIB_DIR)" + $(SWIFT) test --parallel -Xlinker -L"$(EXPORTS_LIB_SUBFOLDER_PATH)" -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 +install-header: .try_build_lib + install "$(EXPORTS_LIB_SUBFOLDER_PATH)/$(LIB_NAME).h" -Dt CEduVpnCommon/Sources/CEduVpnCommon/Headers # Copy header for modulemap clean: rm -rf .build/ CEduVpnCommon/Sources/CEduVpnCommon/Headers/*.h |
