generated from victor-skurikhin/home_work
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.env
39 lines (30 loc) · 1.06 KB
/
Makefile.env
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
PROJECTNAME=$(shell basename "$(PWD)")
# Go related variables.
GOBASE=$(shell pwd)
GOPATH="$(GOBASE)/vendor:$(GOBASE)"
DIR_ETCD_PROXY=cmd/etcd-proxy
GOBIN=$(GOBASE)/$(CMD_FAVORITES)
GOFILES=$(wildcard *.go)
# Redirect error output to a file, so we can show it in development mode.
STDERR=/tmp/.$(PROJECTNAME)-stderr.txt
# PID file will keep the process id of the etcd-proxy
PID_GO_ETCD_PROXY=/tmp/.$(PROJECTNAME)-etcd-proxy.pid
RANDOM=$(shell date +%s)
RND1=$(shell echo "("$RANDOM" % 1024) + 63490" | bc)
RND2=$(shell echo "("$RND1" + 1)" | bc)
GRPC_ADDRESS=localhost:$(RND2)
HTTP_ADDRESS=localhost:$(RND1)
TEMP_FILE=$(shell mktemp)
DOCS_DIR=./docs
DOCS_GO=$(DOCS_DIR)/docs.go
MAIN_GO=./$(CMD_FAVORITES)/main.go
# Make is verbose in Linux. Make it silent.
MAKEFLAGS += --silent
# Define where the *.proto files are located.
PROTO_DIR = ./proto
# Find all the proto files.
# Extend this for subfolders.
PROTO_FILES = $(wildcard $(PROTO_DIR)/*.proto)
# Convert the names of the proto files to the name of the
# generated header files.
PROTO_PB_GO := $(PROTO_FILES:%.proto=%.pb.go)