-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (19 loc) · 708 Bytes
/
Copy pathMakefile
File metadata and controls
26 lines (19 loc) · 708 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
.DEFAULT_GOAL := help
BIN_NAME := evm-wallet
BUILD_DIR := ./out
##@ Build
.PHONY: $(BUILD_DIR)
$(BUILD_DIR): ## Create the build folder.
mkdir -p $(BUILD_DIR)
.PHONY: build
build: $(BUILD_DIR) ## Build go binary.
go build -o $(BUILD_DIR)/$(BIN_NAME) main.go
.PHONY: cross
cross: $(BUILD_DIR) ## Cross-compile go binaries without using CGO.
mkdir -p $(BUILD_DIR)/$(BIN_NAME)_linux_amd64
mkdir -p $(BUILD_DIR)/$(BIN_NAME)_darwin_amd64
GOOS=linux GOARCH=amd64 go build -o $(BUILD_DIR)/$(BIN_NAME)_linux_amd64/$(BIN_NAME) main.go
GOOS=darwin GOARCH=amd64 go build -o $(BUILD_DIR)/$(BIN_NAME)_darwin_amd64/$(BIN_NAME) main.go
.PHONY: clean
clean: ## Clean the binary folder.
$(RM) -r $(BUILD_DIR)