Makefile 518 B

123456789101112131415161718192021222324252627282930
  1. .POSIX:
  2. include config.mk
  3. all: scroll
  4. clean:
  5. rm -f scroll ptty
  6. config.h:
  7. cp config.def.h config.h
  8. scroll: config.h
  9. install: scroll
  10. mkdir -p $(BINDIR) $(MANDIR)/man1
  11. cp -f scroll $(BINDIR)
  12. cp -f scroll.1 $(MANDIR)/man1
  13. test: scroll ptty
  14. # check usage
  15. if ./ptty ./scroll; then exit 1; fi
  16. # check exit passthrough of child
  17. if ! ./ptty ./scroll true; then exit 1; fi
  18. if ./ptty ./scroll false; then exit 1; fi
  19. .c:
  20. $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< -lutil
  21. .PHONY: all clean install test