Improvements to Makefile (#370)

Improvement to `Makefile`. Also see
https://github.com/apple/container/pull/822.
This commit is contained in:
Dmitry Kovba
2025-10-29 15:38:49 -07:00
committed by GitHub
parent d7814e4421
commit aa591a4801
2 changed files with 9 additions and 10 deletions
+1 -2
View File
@@ -13,10 +13,9 @@
# limitations under the License.
# Build configuration variables
# The default version ID 0.0.0 indicates a local development build or PRB
BUILD_CONFIGURATION ?= debug
WARNINGS_AS_ERRORS ?= true
SWIFT_CONFIGURATION = $(if $(filter-out false,$(WARNINGS_AS_ERRORS)),-Xswiftc -warnings-as-errors)
SWIFT_CONFIGURATION := $(if $(filter-out false,$(WARNINGS_AS_ERRORS)),-Xswiftc -warnings-as-errors)
# Commonly used locations
SWIFT := "/usr/bin/swift"
+8 -8
View File
@@ -14,17 +14,17 @@
BUILD_CONFIGURATION := debug
WARNINGS_AS_ERRORS ?= true
SWIFT_WARNING_CONFIG = $(if $(filter-out false,$(WARNINGS_AS_ERRORS)),-Xswiftc -warnings-as-errors)
SWIFT_WARNING_CONFIG := $(if $(filter-out false,$(WARNINGS_AS_ERRORS)),-Xswiftc -warnings-as-errors)
SWIFT_CONFIGURATION := --swift-sdk aarch64-swift-linux-musl $(SWIFT_WARNING_CONFIG)
SWIFT_VERSION = 6.2
SWIFT_SDK_URL = https://download.swift.org/swift-6.2-release/static-sdk/swift-6.2-RELEASE/swift-6.2-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz
SWIFT_SDK_PATH = /tmp/$(notdir $(SWIFT_SDK_URL))
SWIFT_VERSION := 6.2
SWIFT_SDK_URL := https://download.swift.org/swift-6.2-release/static-sdk/swift-6.2-RELEASE/swift-6.2-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz
SWIFT_SDK_PATH := /tmp/$(notdir $(SWIFT_SDK_URL))
SWIFTLY_URL := https://download.swift.org/swiftly/darwin/swiftly.pkg
SWIFTLY_FILENAME = $(notdir $(SWIFTLY_URL))
SWIFTLY_FILENAME := $(notdir $(SWIFTLY_URL))
SWIFTLY_BIN_DIR ?= ~/.swiftly/bin
VMINITD_BIN_PATH := $(shell swift build -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --show-bin-path)
BUILD_BIN_DIR := $(shell swift build -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --show-bin-path)
MACOS_VERSION := $(shell sw_vers -productVersion)
MACOS_MAJOR := $(shell echo $(MACOS_VERSION) | cut -d. -f1)
@@ -40,8 +40,8 @@ all:
@rm -f ./bin/vmexec
@swift --version
@swift build -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION)
@install "$(VMINITD_BIN_PATH)/vminitd" ./bin/
@install "$(VMINITD_BIN_PATH)/vmexec" ./bin/
@install "$(BUILD_BIN_DIR)/vminitd" ./bin/
@install "$(BUILD_BIN_DIR)/vmexec" ./bin/
.PHONY: cross-prep
cross-prep: linux-sdk macos-sdk