-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (20 loc) · 810 Bytes
/
Makefile
File metadata and controls
25 lines (20 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.PHONY: build build-linux-amd64 build-linux-arm64 clean
# Default: build for Linux amd64
build: build-linux-amd64
# Build for Linux amd64 (most common)
build-linux-amd64:
@echo "Building for Linux amd64..."
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o slurmy-linux-amd64 .
@echo "✓ Built slurmy-linux-amd64"
# Build for Linux arm64 (for newer clusters)
build-linux-arm64:
@echo "Building for Linux arm64..."
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags="-s -w" -o slurmy-linux-arm64 .
@echo "✓ Built slurmy-linux-arm64"
# Build both architectures
build-all: build-linux-amd64 build-linux-arm64
@echo "Build complete! Binaries ready:"
@ls -lh slurmy-linux-*
# Clean build artifacts
clean:
rm -f slurmy-linux-amd64 slurmy-linux-arm64 slurmy