forked from byteowlz/ocse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (24 loc) · 659 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (24 loc) · 659 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
26
27
28
29
30
.PHONY: build build-all clean test
# Default build for current platform
build:
go build -o bin/ocse
# Build for all platforms
build-all: clean
mkdir -p bin
GOOS=darwin GOARCH=amd64 go build -o bin/ocse-darwin-amd64
GOOS=darwin GOARCH=arm64 go build -o bin/ocse-darwin-arm64
GOOS=linux GOARCH=amd64 go build -o bin/ocse-linux-amd64
GOOS=linux GOARCH=arm64 go build -o bin/ocse-linux-arm64
GOOS=windows GOARCH=amd64 go build -o bin/ocse-windows-amd64.exe
# Clean build artifacts
clean:
rm -rf bin/
# Run tests
test:
go test ./...
# Install locally
install:
go install
# Development build with race detection
dev:
go build -race -o bin/ocse-dev