Add makefile

Signed-off-by: Terekhin Alexander <alex@bearns.me>
feature/amqp-to-can
Terekhin Alexandr 1 year ago
parent 91455fa626
commit ca8b0228e3
Signed by: didinst
GPG Key ID: E2ACF65D0DF94F98
  1. 30
      Makefile

@ -0,0 +1,30 @@
BINARY = cli-mon
GOARCH = amd64
LDFLAGS = -ldflags "-s -w -buildid=$(git rev-parse HEAD)"
# Build the project
all: clean test linux darwin windows
linux:
GOOS=linux GOARCH=${GOARCH} go build ${LDFLAGS} -tags netgo -o ${BINARY}-linux-${GOARCH} . ; \
cd - >/dev/null
darwin:
GOOS=darwin GOARCH=${GOARCH} go build ${LDFLAGS} -tags netgo -o ${BINARY}-darwin-${GOARCH} . ; \
cd - >/dev/null
windows:
GOOS=windows GOARCH=${GOARCH} go build ${LDFLAGS} -tags netgo -o ${BINARY}-windows-${GOARCH}.exe . ; \
cd - >/dev/null
test:
go test
fmt:
go fmt
clean:
rm -f ${BINARY}-*
.PHONY: linux darwin windows test fmt clean
Loading…
Cancel
Save