-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
31 lines (25 loc) · 891 Bytes
/
Makefile
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
31
# Copyright (c) 2023 Seagate Technology LLC and/or its Affiliates
APP_NAME := cxl-util
help:
@echo ""
@echo "-----------------------------------------------------------------------------------"
@echo "make clean - remove all"
@echo "make local - build a local executable"
@echo "make rebuild - rebuild a local executable"
@echo "make fmt - Run gofmt"
@echo ""
clean:
@echo "Clean up..."
go clean
rm -f $(APP_NAME)
local: clean
@echo "Build local executable..."
go build -o $(APP_NAME) -ldflags "-X main.buildTime=`date -u '+%Y-%m-%dT%H:%M:%S'`" ./cmd/$(APP_NAME)/main.go
ls -lh $(APP_NAME)
fmt:
@echo "Format check"
gofmt -s -w .
rebuild:
@echo "Rebuild local executable..."
go build -a -o $(APP_NAME) -ldflags "-X main.buildTime=`date -u '+%Y-%m-%dT%H:%M:%S'`" ./cmd/$(APP_NAME)/main.go
ls -lh $(APP_NAME)