Add Makefile

This commit is contained in:
Sasha Koshka 2024-12-11 02:28:24 -05:00
parent 0a040cad92
commit cbc31b64a8

29
Makefile Normal file
View File

@ -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