1 | COPTS = -g |
1 | COPTS = -g |
2 | |
2 | |
3 | CFLAGS = -Wall $(COPTS) |
3 | CFLAGS = -Wall $(COPTS) |
4 | |
4 | |
5 | LDFLAGS = -L/usr/X11R6/lib -lX11 |
5 | LDFLAGS = -L/usr/X11R6/lib -lX11 -lXfixes |
6 | |
6 | |
7 | PREFIX = /usr |
7 | PREFIX = $(DESTDIR)/usr |
8 | BINDIR = $(PREFIX)/bin |
8 | BINDIR = $(PREFIX)/bin |
9 | MANDIR = $(PREFIX)/share/man/man1 |
9 | MANDIR = $(PREFIX)/share/man/man1 |
10 | DOCDIR = $(PREFIX)/share/doc/root-tail |
10 | DOCDIR = $(PREFIX)/share/doc/root-tail |
11 | |
11 | |
12 | SOURCES = root-tail.c |
12 | SOURCES = root-tail.c |
|
|
13 | |
13 | all: root-tail man |
14 | all: root-tail man |
14 | |
15 | |
15 | root-tail: $(SOURCES) config.h |
16 | root-tail: $(SOURCES) config.h |
16 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SOURCES) |
17 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SOURCES) |
17 | |
18 | |
… | |
… | |
20 | root-tail.1.gz: root-tail.man |
21 | root-tail.1.gz: root-tail.man |
21 | cp root-tail.man root-tail.1 |
22 | cp root-tail.man root-tail.1 |
22 | gzip -f9 root-tail.1 |
23 | gzip -f9 root-tail.1 |
23 | |
24 | |
24 | clean: |
25 | clean: |
25 | rm -f root-tail root-tail.1.gz |
26 | rm -f root-tail root-tail.o root-tail.1.gz |
26 | |
27 | |
27 | install: all |
28 | install: all |
28 | install -D -o root -g root root-tail $(BINDIR) |
29 | install -D -o root -g root root-tail $(BINDIR) |
29 | install -D -m 0644 -o root -g root root-tail.1.gz $(MANDIR) |
30 | install -D -m 0644 -o root -g root root-tail.1.gz $(MANDIR) |
30 | install -D -m 0644 -o root -g root README $(DOCDIR) |
31 | install -D -m 0644 -o root -g root README $(DOCDIR) |
31 | install -m 0644 -o root -g root Changes $(DOCDIR) |
32 | install -m 0644 -o root -g root Changes $(DOCDIR) |
32 | |
33 | |
33 | uninstall: |
34 | uninstall: |
34 | rm -f $(BINDIR)/root-tail |
|
|
35 | rm -f $(MANDIR)/root-tail.1.gz |
35 | rm -f $(BINDIR)/root-tail $(MANDIR)/root-tail.1.gz |
36 | rm -f $(DOCDIR)/Changes |
36 | rm -f $(DOCDIR)/README $(DOCDIR)/Changes |
37 | rm -f $(DOCDIR)/README |
|
|
38 | rmdir --ignore-fail-on-non-empty $(DOCDIR) |
37 | rmdir --ignore-fail-on-non-empty $(DOCDIR) |
39 | |
38 | |