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
|
DESTDIR ?=
PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/man
PKG_CONFIG ?= pkg-config
CFLAGS += -Wall -Wextra
CFLAGS += `$(PKG_CONFIG) --cflags ncursesw`
LDLIBS += `$(PKG_CONFIG) --libs ncursesw` -lm
all: ttyplot stresstest
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 $(DESTDIR)$(PREFIX)/bin/ttyplot
rm -f $(DESTDIR)$(MANPREFIX)/man1/ttyplot.1
clean:
rm -f ttyplot stresstest
.c:
@$(PKG_CONFIG) --version > /dev/null
$(CC) $(CFLAGS) $(LDFLAGS) $< $(LDLIBS) -o $@
.PHONY: all clean install uninstall
|