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
|
LDFLAGS += -lX11 -lXfixes
PREFIX = $(DESTDIR)/usr
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man/man1
DOCDIR = $(PREFIX)/share/doc/root-tail
SOURCES = root-tail.c
all: root-tail man
root-tail: $(SOURCES) config.h
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(SOURCES) $(LDFLAGS)
man: root-tail.1.gz
root-tail.1.gz: root-tail.man
cp root-tail.man root-tail.1
gzip -f9 root-tail.1
clean:
rm -f root-tail root-tail.o root-tail.1.gz
install: all
install -D root-tail $(BINDIR)
install -D -m 0644 root-tail.1.gz $(MANDIR)
install -D -m 0644 README $(DOCDIR)
install -m 0644 Changes $(DOCDIR)
uninstall:
rm -f $(BINDIR)/root-tail $(MANDIR)/root-tail.1.gz
rm -f $(DOCDIR)/README $(DOCDIR)/Changes
rmdir --ignore-fail-on-non-empty $(DOCDIR)
|