Makefile: LICENSE file will be handled by install/uninstall targets

This commit is contained in:
Franz König 2017-09-16 01:42:50 +02:00
parent 968beb434a
commit 0c6ef732b4

View file

@ -2,6 +2,7 @@ VERSION = 1.4
PREFIX ?= /usr/local
MANPREFIX = $(PREFIX)/share/man
LICENSEPREFIX = $(PREFIX)/share/licenses/$(BIN)
CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter
LDLIBS = -lreadline
@ -35,11 +36,14 @@ install: all
cp -f $(PLAYER) $(DESTDIR)$(PREFIX)/bin
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cp -f $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1
install -d $(LICENSEPREFIX)
install LICENSE $(LICENSEPREFIX)
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
rm -f $(DESTDIR)$(PREFIX)/bin/$(PLAYER)
rm -f $(DESTDIR)$(MANPREFIX)/man1/$(BIN).1
rm -rf $(DESTDIR)$(LICENSEPREFIX)
dist:
mkdir -p nnn-$(VERSION)