-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·37 lines (30 loc) · 1.1 KB
/
Copy pathMakefile
File metadata and controls
executable file
·37 lines (30 loc) · 1.1 KB
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
30
31
32
33
34
35
36
37
VERSION = 1.7.6
DESTDIR ?=
PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/man
CPPFLAGS += -DVERSION_STR='"$(VERSION)"'
CFLAGS += -Wall -Wextra
CFLAGS += `pkg-config --cflags ncursesw`
LDLIBS += `pkg-config --libs ncursesw` -lm
# Experimental, opt-in ASCII-art rendering backend (aalib). Off by default;
# build with `make AA=1` (requires aalib and its aalib-config helper).
# Written without GNU-only `ifdef` so this file also parses under BSD make (bmake).
AALIB_CPPFLAGS_1 = -DAALIB `aalib-config --cflags`
AALIB_LDLIBS_1 = `aalib-config --libs`
CPPFLAGS += $(AALIB_CPPFLAGS_$(AA))
LDLIBS += $(AALIB_LDLIBS_$(AA))
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) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $< $(LDLIBS) -o $@
.PHONY: all clean install uninstall