forked from bravetools/bravetools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (37 loc) · 1.11 KB
/
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
32
33
34
35
36
37
38
39
40
41
VERSION := $(shell cat ./VERSION)
BINARY_NAME := brave
GO_LDFLAGS="-s -X github.com/bravetools/bravetools/shared.braveVersion=$(VERSION)"
ubuntu:
@echo "Testing for requirements"
./scripts/test_ubuntu_prereqs.bash
@echo "Building Bravetools ..."
go clean
go get
rm -f install/ubuntu/$(BINARY_NAME)
@GOOS=linux go build -ldflags=$(GO_LDFLAGS) -o install/ubuntu/$(BINARY_NAME) *.go
@echo "Installing ..."
sudo cp install/ubuntu/brave /usr/bin/
@echo "version: "$(VERSION)
@echo "Bravetools installed"
linux:
@echo "Building Bravetools ..."
go clean
go get
rm -f install/linux/$(BINARY_NAME)
@GOOS=linux go build -ldflags=$(GO_LDFLAGS) -o install/linux/$(BINARY_NAME) *.go
@echo "Installing ..."
sudo cp install/linux/brave /usr/bin/
@echo "version: "$(VERSION)
@echo "Bravetools installed"
darwin:
@echo "Building Bravetools ..."
go clean
go get
rm -f install/darwin/$(BINARY_NAME)
@GOOS=darwin go build -ldflags=$(GO_LDFLAGS) -o install/darwin/$(BINARY_NAME) *.go
@echo "Installing ..."
sudo cp -f install/darwin/brave /usr/local/bin/
@echo "version: "$(VERSION)
@echo "Bravetools installed"
deps:
go get -u