Makefile 465 B

123456789101112131415161718192021222324
  1. include config.mk
  2. .PHONY: all clean install test
  3. all: scroll
  4. clean:
  5. rm -f scroll ptty
  6. config.h:
  7. cp config.def.h config.h
  8. scroll: scroll.c config.h
  9. $(CC) $(CFLAGS) $(CPPFLAGS) scroll.c $(LDLIBS) -o $@
  10. install: scroll
  11. cp scroll ${BINDIR}
  12. cp scroll.1 ${MAN1DIR}
  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