aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 1121ff9a33925f93cb18098132673a2909e5d24e (plain) (blame)
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
.PHONY:

CONFIGFILE = config.mk
include $(CONFIGFILE)

all: read-quickly

read-quickly: read-quickly.o
	$(CC) -o $@ $@.o $(LDFLAGS)

.c.o:
	$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)

install: read-quickly
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
	mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
	cp -- read-quickly "$(DESTDIR)$(PREFIX)/bin/"
	cp -- read-quickly.1 "$(DESTDIR)$(MANPREFIX)/man1/"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/read-quickly"
	-rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/read-quickly.1"

clean:
	-rm -rf -- read-quickly *.o

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean