aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 0f5e821f668fcac085179244f41cf5e1717c911f (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
31
32
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

all: pdeath

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

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

install: bin/pdeath
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
	mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/pdeath"
	mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
	cp -- pdeath "$(DESTDIR)$(PREFIX)/bin/"
	cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/pdeath/"
	cp -- pdeath.1 "$(DESTDIR)$(MANPREFIX)/man1/"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/pdeath"
	-rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/pdeath.1"
	-rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/pdeath"

clean:
	-rm -f -- *.o pdeath

SUFFIXES: .o .c.o

.PHONY: all check install uninstall clean