-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (26 loc) · 916 Bytes
/
Makefile
File metadata and controls
32 lines (26 loc) · 916 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
31
32
PKG := github.com/opendexnetwork/opendex-docker-api
GO_BIN := ${GOPATH}/bin
GOBUILD := go build -v
VERSION := local
COMMIT := $(shell git rev-parse HEAD)
ifeq ($(OS),Windows_NT)
TIMESTAMP := $(shell powershell.exe scripts\get_timestamp.ps1)
else
TIMESTAMP := $(shell date +%s)
endif
LDFLAGS := -ldflags "-w -s \
-X $(PKG)/build.Version=$(VERSION) \
-X $(PKG)/build.GitCommit=$(COMMIT) \
-X $(PKG)/build.Timestamp=$(TIMESTAMP)"
default: build
.PHONY: build
build:
$(GOBUILD) $(LDFLAGS) ./cmd/proxy
.PHONY: proto
proto:
echo "Compiling opendexd gRPC protocols"
protoc -I service/opendexd/proto opendexrpc.proto --go_out=plugins=grpc:service/opendexd/opendexrpc
echo "Compiling lnd gRPC protocols"
protoc -I service/lnd/proto rpc.proto --go_out=plugins=grpc:service/lnd/lnrpc
echo "Compiling boltz gRPC protocols"
protoc -I service/boltz/proto boltzrpc.proto --go_out=plugins=grpc:service/boltz/boltzrpc