Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. # This is BSD Makefile
  2. # BSD GNU
  3. # ${.TARGET} $@
  4. # ${.ALLSRC} $^
  5. # ${.IMPSRC} $<
  6. all: Net.txt dumphstrerrno
  7. PY = python2.7
  8. DEFS = defs-socket defs-in defs-netdb
  9. #defs-ioctl: mkioctl
  10. # ./mkioctl > ${.TARGET}
  11. Net.txt: Net.txt.templ ${DEFS}
  12. ${PY} ./untempl.py Net.txt.templ ${.TARGET}
  13. defs-socket:
  14. ./dumpdefs.py 3 1 i /usr/include/sys/socket.h | grep " SOCK_" > ${.TARGET}
  15. ./dumpdefs.py 3 1 i /usr/include/sys/socket.h | grep " AF_" >> ${.TARGET}
  16. ./dumpdefs.py 3 1 i /usr/include/sys/socket.h | grep " SHUT_" >> ${.TARGET}
  17. ./dumpdefs.py 3 1 i /usr/include/sys/socket.h | grep " SOMAXCONN" >> ${.TARGET}
  18. ./dumpdefs.py 3 1 s /usr/include/sys/socket.h | grep " SO_" >> ${.TARGET}
  19. ./dumpdefs.py 3 1 i /usr/include/sys/socket.h | grep " SOL_" >> ${.TARGET}
  20. ./dumpdefs.py 3 1 s /usr/include/sys/socket.h | grep " MSG_" >> ${.TARGET}
  21. defs-in:
  22. ./dumpdefs.py 3 1 i /usr/include/netinet/in.h | grep " IPPROTO_" > ${.TARGET}
  23. defs-netdb:
  24. ./dumpdefs.py 3 2 i /usr/include/netdb.h > ${.TARGET}
  25. clean:
  26. rm -f Net.txt ${DEFS} dumphstrerrno