DEADSOFTWARE

022db2536dbb6e206c9f0ccac04a879241b99cae
[bbcp.git] / Trurl-based / _OpenBSD_ / Lin / Mod / gen-Libc / Makefile
1 # This is BSD Makefile
2 # BSD GNU
3 # ${.TARGET} $@
4 # ${.ALLSRC} $^
5 # ${.IMPSRC} $<
7 PY = python2.7
9 DEFS = defs-errno defs-signal defs-sc defs-madv defs-siginfo defs-siginfo1 defs-sa defs-mman defs-fcntl defs-sig
11 all: Libc.txt ${DEFS}
13 Libc.txt: Libc.txt.templ ${DEFS} sizeofs
14 ${PY} ./untempl.py Libc.txt.templ ${.TARGET}
15 # ${PY} ./untempl2.py ${.TARGET}.tmp ${.TARGET}
16 # rm -f ${.TARGET}.tmp
18 sizeofs: sizeofs.c
19 ${CC} -O0 -g -o ${.TARGET} ${.ALLSRC}
21 defs-errno:
22 ./dumpdefs.py 2 0 i /usr/include/sys/errno.h > ${.TARGET}
24 defs-signal:
25 ./dumpdefs.py 2 1 i /usr/include/sys/signal.h > ${.TARGET}
26 ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep SIGWINCH >> ${.TARGET}
27 ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep SIGTHR >> ${.TARGET}
29 defs-sig:
30 ./dumpdefs.py 2 2 i /usr/include/sys/signal.h | grep SIG_ > ${.TARGET}
32 defs-sa:
33 ./dumpdefs.py 2 2 s /usr/include/sys/signal.h | grep " SA_" > ${.TARGET}
34 ./dumpdefs.py 2 3 s /usr/include/sys/signal.h | grep " SA_" >> ${.TARGET}
36 defs-mman:
37 ./dumpdefs.py 2 0 s /usr/include/sys/mman.h | grep " PROT_" > ${.TARGET}
38 ./dumpdefs.py 2 0 s /usr/include/sys/mman.h | grep " MAP_" >> ${.TARGET}
40 defs-fcntl:
41 ./dumpdefs.py 2 2 s /usr/include/fcntl.h | grep -v compat | grep " O_" > ${.TARGET}
42 ./dumpdefs.py 2 1 s /usr/include/fcntl.h | grep " O_" >> ${.TARGET}
44 defs-siginfo:
45 ./dumpdefs.py 2 1 i /usr/include/sys/siginfo.h > ${.TARGET}
46 ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h >> ${.TARGET}
48 defs-sc:
49 ./dumpdefs.py 2 1 i /usr/include/unistd.h | grep _SC_ > ${.TARGET}
51 defs-madv:
52 ./dumpdefs.py 2 0 i /usr/include/sys/mman.h | grep MADV > ${.TARGET}
53 ./dumpdefs.py 2 1 i /usr/include/sys/mman.h | grep MADV >> ${.TARGET}
55 defs-siginfo1:
56 ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep FPE_ > ${.TARGET}
57 ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep ILL_ >> ${.TARGET}
58 ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep SEGV_ >> ${.TARGET}
59 ./dumpdefs.py 2 2 i /usr/include/sys/siginfo.h | grep BUS_ >> ${.TARGET}
61 clean:
62 rm -f sizeofs ${DEFS} Libc.txt