donation-notification/Makefile

34 lines
621 B
Makefile

.POSIX:
PREFIX ?= /usr
GO ?= go
GOFLAGS ?= -buildvcs=false
RM ?= rm -f
all: donation-notification
donation-notification:
$(GO) build $(GOFLAGS) .
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f donation-notification $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/donation-notification
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/donation-notification
clean:
$(RM) donation-notification
run:
go run -race .
watch:
fd -e go -e tmpl | entr -rcs "go run . -config config.toml"
lint:
fd -e go | entr -c golangci-lint run
.PHONY: all donation-notification install uninstall clean run watch lint