aboutsummaryrefslogtreecommitdiff
path: root/cmd/app/Makefile
diff options
context:
space:
mode:
authorjloup <jean-loup.jamet@trainline.com>2018-02-14 14:19:09 +0100
committerjloup <jean-loup.jamet@trainline.com>2018-02-14 14:19:09 +0100
commit7a9e5112eaaea58d55f181d3e5296e4ff839921c (patch)
tree968ed193f42a1fad759cc89ad2f8ad5b0091291e /cmd/app/Makefile
downloadFront-7a9e5112eaaea58d55f181d3e5296e4ff839921c.tar.gz
Front-7a9e5112eaaea58d55f181d3e5296e4ff839921c.tar.zst
Front-7a9e5112eaaea58d55f181d3e5296e4ff839921c.zip
initial commit
Diffstat (limited to 'cmd/app/Makefile')
-rw-r--r--cmd/app/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/cmd/app/Makefile b/cmd/app/Makefile
new file mode 100644
index 0000000..628910f
--- /dev/null
+++ b/cmd/app/Makefile
@@ -0,0 +1,30 @@
1# Go parameters
2GOCMD=go
3GOBUILD=$(GOCMD) build
4GOCLEAN=$(GOCMD) clean
5GOTEST=$(GOCMD) test
6BINARY_NAME=cryptoportfolio-app
7LINUX_ARCHES=amd64 386
8DIST_DIR ?= dist
9
10build:
11 $(GOBUILD) -o $(BINARY_NAME) -v
12
13test:
14 $(GOTEST) -v ./...
15
16clean:
17 $(GOCLEAN)
18 rm -f $(BINARY_NAME)
19 rm -rf dist
20
21run: build
22 ./$(BINARY_NAME)
23
24$(addprefix $(DIST_DIR)/linux_, $(LINUX_ARCHES)):
25 mkdir -p $(@)
26 CGO_ENABLED=0 GOOS=linux GOARCH=$(subst linux_,,$(notdir $@)) $(GOBUILD) -o $@/$(BINARY_NAME) -v
27
28release: $(addprefix $(DIST_DIR)/linux_, $(LINUX_ARCHES))
29
30.PHONY: clean release