From cbc31b64a8c6fc210efb56757b9fa2ff34a7fd61 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 11 Dec 2024 02:28:24 -0500 Subject: [PATCH] Add Makefile --- Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1eed3b7 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +.POSIX: +.SUFFIXES: +GO=go +GOFLAGS= + +DESTDIR= +PREFIX=/usr/local +BINDIR=$(PREFIX)/bin + +all: build/stepd build/step + +build/%: + $(GO) build $(GOFLAGS) -o $@ ./cmd/$(shell basename $@) + +check: + $(GO) test $(GOFLAGS) + +clean: + rm -f build/* + +install: + install -Dm755 $(BUILDDIR)/stepd $(DESTDIR)$(BINDIR)/stepd + install -Dm755 $(BUILDDIR)/step $(DESTDIR)$(BINDIR)/step + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/stepd + rm -f $(DESTDIR)$(BINDIR)/step + +.PHONY: all check clean install uninstall