Makefile 530 B

123456789101112131415161718192021222324252627
  1. # This is GNU Makefile
  2. # BSD GNU
  3. # ${.TARGET} $@
  4. # ${.ALLSRC} $^
  5. # ${.IMPSRC} $<
  6. INCDIR ?= /usr/include
  7. all: mkioctl Ioctl.odc
  8. Ioctl.odc: Ioctl.txt
  9. ./txt2odc.py Ioctl.txt Ioctl.odc
  10. PY = python2.7
  11. DEFS = defs-tiocm defs-ioctl
  12. defs-ioctl: mkioctl
  13. ./mkioctl > $@
  14. Ioctl.txt: Ioctl.txt.templ ${DEFS} libver osname machine
  15. ${PY} ./untempl.py Ioctl.txt.templ $@
  16. defs-tiocm:
  17. ./dumpdefs.py 2 0 s ${INCDIR}/i386-linux-gnu/bits/ioctl-types.h | grep TIOCM_ > $@
  18. clean:
  19. rm -f mkioctl Ioctl.txt Ioctl.odc ${DEFS}