forked from filswan/go-computing-provider
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile
30 lines (20 loc) · 894 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
SHELL=/usr/bin/env bash
project_name=computing-provider
unexport GOFLAGS
GOCC?=go
ldflags=-X=github.com/swanchain/go-computing-provider/build.CurrentCommit=+git.$(subst -,.,$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null))
all: mainnet
.PHONY: all
computing-provider:
rm -rf computing-provider
$(GOCC) build $(GOFLAGS) -o computing-provider ./cmd/computing-provider
.PHONY: computing-provider
install:
sudo install -C computing-provider /usr/local/bin/computing-provider
clean:
sudo rm -rf /usr/local/bin/computing-provider
.PHONY: clean
mainnet: GOFLAGS+= -ldflags="$(ldflags) -X github.com/swanchain/go-computing-provider/build.NetWorkTag=mainnet"
mainnet: computing-provider
testnet: GOFLAGS+= -ldflags="$(ldflags) -X github.com/swanchain/go-computing-provider/build.NetWorkTag=testnet"
testnet: computing-provider