Skip to content

Commit 313ff93

Browse files
committed
feat: add darwin-arm64 and linux-arm64 build targets
Add cross-compilation targets for Apple Silicon Macs and ARM64 Linux.
1 parent 0dd71bd commit 313ff93

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

Makefile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,29 @@ dev: ## Run the application in development mode
9090
@$(GORUN) ${LDFLAGS} ./cmd/ee
9191

9292
# Cross compilation targets
93-
.PHONY: build-linux build-windows build-darwin
94-
build-linux: ## Build for Linux
95-
@echo "Building for Linux..."
93+
.PHONY: build-linux build-linux-arm64 build-windows build-darwin build-darwin-arm64
94+
build-linux: ## Build for Linux (amd64)
95+
@echo "Building for Linux (amd64)..."
9696
@GOOS=linux GOARCH=amd64 $(GOBUILD) ${LDFLAGS} -o $(BUILD_DIR)/$(BINARY_NAME)-linux-amd64 ./cmd/ee
9797

98+
build-linux-arm64: ## Build for Linux (arm64)
99+
@echo "Building for Linux (arm64)..."
100+
@GOOS=linux GOARCH=arm64 $(GOBUILD) ${LDFLAGS} -o $(BUILD_DIR)/$(BINARY_NAME)-linux-arm64 ./cmd/ee
101+
98102
build-windows: ## Build for Windows
99103
@echo "Building for Windows..."
100104
@GOOS=windows GOARCH=amd64 $(GOBUILD) ${LDFLAGS} -o $(BUILD_DIR)/$(BINARY_NAME)-windows-amd64.exe ./cmd/ee
101105

102-
build-darwin: ## Build for macOS
103-
@echo "Building for macOS..."
106+
build-darwin: ## Build for macOS (amd64/Intel)
107+
@echo "Building for macOS (amd64)..."
104108
@GOOS=darwin GOARCH=amd64 $(GOBUILD) ${LDFLAGS} -o $(BUILD_DIR)/$(BINARY_NAME)-darwin-amd64 ./cmd/ee
105109

110+
build-darwin-arm64: ## Build for macOS (arm64/Apple Silicon)
111+
@echo "Building for macOS (arm64)..."
112+
@GOOS=darwin GOARCH=arm64 $(GOBUILD) ${LDFLAGS} -o $(BUILD_DIR)/$(BINARY_NAME)-darwin-arm64 ./cmd/ee
113+
106114
.PHONY: build-all
107-
build-all: build-linux build-windows build-darwin ## Build for all platforms
115+
build-all: build-linux build-linux-arm64 build-windows build-darwin build-darwin-arm64 ## Build for all platforms
108116

109117
# Release management
110118
.PHONY: release

0 commit comments

Comments
 (0)