Add Makefile
This commit is contained in:
parent
0a040cad92
commit
cbc31b64a8
29
Makefile
Normal file
29
Makefile
Normal 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
|
Loading…
Reference in New Issue
Block a user