Improve Makefile
This commit is contained in:
parent
cbc31b64a8
commit
b865dd251c
6
Makefile
6
Makefile
@ -7,9 +7,12 @@ DESTDIR=
|
|||||||
PREFIX=/usr/local
|
PREFIX=/usr/local
|
||||||
BINDIR=$(PREFIX)/bin
|
BINDIR=$(PREFIX)/bin
|
||||||
|
|
||||||
|
SRCS=$(shell find . -name '*.go' -or -name '*.mod')
|
||||||
|
|
||||||
all: build/stepd build/step
|
all: build/stepd build/step
|
||||||
|
|
||||||
build/%:
|
build/%: $(SRCS)
|
||||||
|
mkdir -p build
|
||||||
$(GO) build $(GOFLAGS) -o $@ ./cmd/$(shell basename $@)
|
$(GO) build $(GOFLAGS) -o $@ ./cmd/$(shell basename $@)
|
||||||
|
|
||||||
check:
|
check:
|
||||||
@ -17,6 +20,7 @@ check:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f build/*
|
rm -f build/*
|
||||||
|
rmdir build
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -Dm755 $(BUILDDIR)/stepd $(DESTDIR)$(BINDIR)/stepd
|
install -Dm755 $(BUILDDIR)/stepd $(DESTDIR)$(BINDIR)/stepd
|
||||||
|
Loading…
Reference in New Issue
Block a user