1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
DESTDIR ?=
PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/man
CFLAGS += -Wall -Wextra
LDLIBS += -lcurses
PKG = ttyplot_1.4-1
PKGDIR = $(PKG)/usr/local/bin
all: ttyplot
install: ttyplot ttyplot.1
install -d $(DESTDIR)$(PREFIX)/bin
install -d $(DESTDIR)$(MANPREFIX)/man1
install -m755 ttyplot $(DESTDIR)$(PREFIX)/bin
install -m644 ttyplot.1 $(DESTDIR)$(MANPREFIX)/man1
uninstall:
rm -f $(PREFIX)$(PREFIX)/bin/ttyplot
rm -f $(PREFIX)$(MANPREFIX)/man1/ttyplot.1
deb: ttyplot
mkdir -p $(PKGDIR)
cp ttyplot $(PKGDIR)
dpkg-deb --build $(PKG)
clean:
rm -f ttyplot torture $(PKGDIR)/*
.PHONY: all clean install uninstall
|