aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 0e2dff47726a980a5731043b910ea297a0fc6c57 (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
33
34
35
36
37
38
39
40
41
42
43
44
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

OBJ =\
	deadshred.o\
	io.o\
	fmt.o\
	text.o\
	avg.o\
	rnd.o\
	sig.o

HDR =\
	common.h

all: deadshred
$(OBJ): $(HDR)

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

deadshred: $(OBJ)
	$(CC) -o $@ $(OBJ) $(LDFLAGS)

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

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

clean:
	-rm -f -- *.o *.a *.lo *.su *.so *.so.* *.gch *.gcov *.gcno *.gcda
	-rm -f -- deadshred

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean