From e090810f17d1d61edda38ab66ae754482f8aae09 Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 4 Oct 2021 12:04:55 -0400 Subject: [PATCH] actually add makefile --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..347a510 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +#set variables +GIT_COMMIT := $(shell git rev-list -1 HEAD) +ifeq ($(PREFIX),) # PREFIX is environment variable, but if it is not set, then set default value + PREFIX := /usr/local +endif + +all: tome_ws + +tome_ws: $(wildcard *.go) + go build -ldflags "-X main.GitCommit=$(GIT_COMMIT)" + +clean: + rm -f tome_ws +