From a21d894fb128e49d6ef912bbed51bfb0754223fa Mon Sep 17 00:00:00 2001 From: Steven Bakker <661642+SionX@users.noreply.github.com> Date: Tue, 31 Mar 2020 19:03:45 +0200 Subject: make build productions binaries (#5) * added production build commands in make * Small spelling error :-( but fixed it * style: changed flags into single variable that can be used mutible times * Read comment more better made it even better ;-) * learn to test and not rush things * Rename LDFLAG to LDFLAGS LDFLAGS is idiomatic. Co-authored-by: Raul Benencia --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a831cb3..5f33e91 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ GO = go SCDOC = scdoc +LDFLAGS = "-s -w" pkgs = $(shell $(GO) list ./... | grep -v /vendor/) @@ -22,3 +23,9 @@ test: fmt ./test/integ-test/integ_test.py .PHONY: all clean docs + +binaries: linux windows +linux: + GOOS=linux ${GO} build -o bin/shoelaces -ldflags ${LDFLAGS} +windows: + GOOS=windows ${GO} build -o bin/shoelaces.exe -ldflags ${LDFLAGS} -- cgit v1.2.3