Makefile (978B)
1 .POSIX: 2 3 include config.mk 4 5 all: scroll 6 7 config.h: 8 cp config.def.h config.h 9 10 scroll: scroll.c config.h 11 12 install: scroll 13 mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 14 cp -f scroll $(DESTDIR)$(BINDIR) 15 cp -f scroll.1 $(DESTDIR)$(MANDIR)/man1 16 17 uninstall: 18 rm -f $(DESTDIR)$(BINDIR)/scroll $(DESTDIR)$(MANDIR)/man1/scroll.1 19 20 test: scroll ptty 21 # check usage 22 if ./ptty ./scroll -h; then exit 1; fi 23 # check exit passthrough of child 24 if ! ./ptty ./scroll true; then exit 1; fi 25 if ./ptty ./scroll false; then exit 1; fi 26 ./up.sh 27 28 clean: 29 rm -f scroll ptty 30 31 distclean: clean 32 rm -f config.h scroll-$(VERSION).tar.gz 33 34 dist: clean 35 mkdir -p scroll-$(VERSION) 36 cp -R README scroll.1 TODO Makefile config.mk config.def.h \ 37 ptty.c scroll.c up.sh up.log \ 38 scroll-$(VERSION) 39 tar -cf - scroll-$(VERSION) | gzip > scroll-$(VERSION).tar.gz 40 rm -rf scroll-$(VERSION) 41 42 .c: 43 $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< -lutil 44 45 .PHONY: all install test clean distclean dist