Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # This is BSD Makefile
  2. # BSD GNU
  3. # ${.TARGET} $@
  4. # ${.ALLSRC} $^
  5. # ${.IMPSRC} $<
  6. PY = python2.7
  7. DEFS = defs-errno defs-signal defs-sc defs-madv defs-siginfo defs-siginfo1 defs-sa defs-mman defs-fcntl defs-sig
  8. all: Libc.txt ${DEFS}
  9. Libc.txt: Libc.txt.templ ${DEFS} sizeofs
  10. ${PY} ./untempl.py Libc.txt.templ ${.TARGET}
  11. # ${PY} ./untempl2.py ${.TARGET}.tmp ${.TARGET}
  12. # rm -f ${.TARGET}.tmp
  13. sizeofs: sizeofs.c
  14. ${CC} -O0 -g -o ${.TARGET} ${.ALLSRC}
  15. defs-errno:
  16. ./dumpdefs.py 2 0 i /usr/include/sys/errno.h > ${.TARGET}
  17. defs-signal:
  18. ./dumpdefs.py 2 1 i /usr/include/sys/signal.h > ${.TARGET}
  19. ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep SIGWINCH >> ${.TARGET}
  20. ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep SIGTHR >> ${.TARGET}
  21. defs-sig:
  22. ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep SIG_ > ${.TARGET}
  23. defs-sa:
  24. ./dumpdefs.py 2 2 s /usr/include/sys/signal.h | grep " SA_" > ${.TARGET}
  25. ./dumpdefs.py 2 3 s /usr/include/sys/signal.h | grep " SA_" >> ${.TARGET}
  26. defs-mman:
  27. ./dumpdefs.py 2 0 s /usr/include/sys/mman.h | grep " PROT_" > ${.TARGET}
  28. ./dumpdefs.py 2 0 s /usr/include/sys/mman.h | grep " MAP_" >> ${.TARGET}
  29. defs-fcntl:
  30. ./dumpdefs.py 2 2 s /usr/include/fcntl.h | grep -v compat | grep " O_" > ${.TARGET}
  31. ./dumpdefs.py 2 1 s /usr/include/fcntl.h | grep " O_" >> ${.TARGET}
  32. defs-siginfo:
  33. ./dumpdefs.py 2 1 i /usr/include/sys/siginfo.h > ${.TARGET}
  34. ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h >> ${.TARGET}
  35. defs-sc:
  36. ./dumpdefs.py 2 1 i /usr/include/unistd.h | grep _SC_ > ${.TARGET}
  37. defs-madv:
  38. ./dumpdefs.py 2 0 i /usr/include/sys/mman.h | grep MADV > ${.TARGET}
  39. ./dumpdefs.py 2 1 i /usr/include/sys/mman.h | grep MADV >> ${.TARGET}
  40. defs-siginfo1:
  41. ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep FPE_ > ${.TARGET}
  42. ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep ILL_ >> ${.TARGET}
  43. ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep SEGV_ >> ${.TARGET}
  44. ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep BUS_ >> ${.TARGET}
  45. clean:
  46. rm -f sizeofs ${DEFS} Libc.txt