From 4da3bcdadba0de63ca25d6f696a25cfe3cde0dc6 Mon Sep 17 00:00:00 2001 From: n0m1s Date: Sat, 28 Sep 2019 12:05:26 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 makefile diff --git a/makefile b/makefile new file mode 100644 index 0000000..d75f914 --- /dev/null +++ b/makefile @@ -0,0 +1,19 @@ +GO := $(shell which go) + +BINARY_NAME := jdr-server + +FILES = $(shell find . -type f -name '*.go') + +.PHONY: all run clean + +all: $(BINARY_NAME) + +$(BINARY_NAME): $(FILES) + $(GO) fmt $(addprefix ./, $(shell dirname $^ | sort | uniq)) + $(GO) get + $(GO) build -o $@ -v + +run: $(BINARY_NAME) + ./$(BINARY_NAME) + +clean: