Makefile 572 B

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