aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: eedff0a495ba473f2e3487da8a9f3451753ea69d (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: rq

rq: rq.o
	$(CC) -o $@ $@.o $(LDFLAGS)

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

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

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

clean:
	-rm -rf -- rq *.o

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean