mirror of
https://gitlab.com/EternalWanderer/dice-roller.git
synced 2024-11-28 21:03:51 +01:00
33 lines
842 B
Makefile
33 lines
842 B
Makefile
VERSION = 0.1
|
|
PREFIX = /usr/local
|
|
MANPREFIX = $(PREFIX)/share/man
|
|
|
|
SRC = main.go go.mod
|
|
|
|
all: dice-roller
|
|
|
|
dice-roller:
|
|
go build -o dice-roller
|
|
|
|
clean:
|
|
rm -f dice-roller dice-roller-$(VERSION).tar.gz
|
|
|
|
dist: clean
|
|
mkdir -p dice-roller-$(VERSION)
|
|
cp -R LICENSE Makefile README.md dice-roller.1 $(SRC) dice-roller-$(VERSION)
|
|
tar -cf dice-roller-$(VERSION).tar dice-roller-$(VERSION)
|
|
gzip dice-roller-$(VERSION).tar
|
|
rm -rf dice-roller-$(VERSION)
|
|
|
|
install: all
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
cp -f dice-roller $(DESTDIR)$(PREFIX)/bin
|
|
chmod 775 $(DESTDIR)$(PREFIX)/bin/dice-roller
|
|
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
|
|
cat dice-roller.1 > $(DESTDIR)$(MANPREFIX)/man1/dice-roller.1
|
|
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dice-roller.1
|
|
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/dice-roller\
|
|
$(DESTDIR)$(MANPREFIX)/man1/dice-roller.1
|