Deleted Added
full compact
Makefile.inc (66430) Makefile.inc (71770)
1# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
1# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
2# $FreeBSD: head/lib/libc/sys/Makefile.inc 66430 2000-09-28 22:39:59Z peter $
2# $FreeBSD: head/lib/libc/sys/Makefile.inc 71770 2001-01-29 03:23:46Z deischen $
3
4# sys sources
5.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys ${.CURDIR}/../libc/sys
6
7# Include the generated makefile containing the *complete* list
8# of syscall names in MIASM.
9.include "${.CURDIR}/../../sys/sys/syscall.mk"
10
11# Include machine dependent definitions.
12#
13# MDASM names override the default syscall names in MIASM.
14# NOASM will prevent the default syscall code from being generated.
15#
16.include "${.CURDIR}/../libc/${MACHINE_ARCH}/sys/Makefile.inc"
17
18# Sources common to both syscall interfaces:
3
4# sys sources
5.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys ${.CURDIR}/../libc/sys
6
7# Include the generated makefile containing the *complete* list
8# of syscall names in MIASM.
9.include "${.CURDIR}/../../sys/sys/syscall.mk"
10
11# Include machine dependent definitions.
12#
13# MDASM names override the default syscall names in MIASM.
14# NOASM will prevent the default syscall code from being generated.
15#
16.include "${.CURDIR}/../libc/${MACHINE_ARCH}/sys/Makefile.inc"
17
18# Sources common to both syscall interfaces:
19SRCS+= ftruncate.c lseek.c mmap.c pread.c pwrite.c truncate.c
19SRCS+= ftruncate.c lseek.c mmap.c pread.c pwrite.c truncate.c __error.c
20
20
21# Build __error() into libc, but not libc_r which has its own:
22.if ${LIB} == "c"
23SRCS+= __error.c
24.endif
25
26# Add machine dependent asm sources:
27SRCS+=${MDASM}
28
29# Look though the complete list of syscalls (MIASM) for names that are
30# not defined with machine dependent implementations (MDASM) and are
21# Add machine dependent asm sources:
22SRCS+=${MDASM}
23
24# Look though the complete list of syscalls (MIASM) for names that are
25# not defined with machine dependent implementations (MDASM) and are
31# not declared for no generation of default code (NOASM). If the
32# syscall is not hidden, add it to the ASM list, otherwise add it
33# to the ASMR list.
26# not declared for no generation of default code (NOASM). Add each
27# syscall that satisfies these conditions to the ASM list.
34.for _asm in ${MIASM}
35.if (${MDASM:R:M${_asm:R}} == "")
36.if (${NOASM:R:M${_asm:R}} == "")
28.for _asm in ${MIASM}
29.if (${MDASM:R:M${_asm:R}} == "")
30.if (${NOASM:R:M${_asm:R}} == "")
37.if (${HIDDEN_SYSCALLS:R:M${_asm:R}} == "")
38ASM+=$(_asm)
31ASM+=$(_asm)
39.else
40ASMR+=$(_asm)
41.endif
42.endif
32.endif
33.endif
43.endif
44.endfor
45
34.endfor
35
46OBJS+= ${ASM} ${ASMR} ${PSEUDO} ${PSEUDOR}
36OBJS+= ${ASM} ${PSEUDO}
47
48SASM= ${ASM:S/.o/.S/}
49
37
38SASM= ${ASM:S/.o/.S/}
39
50SASMR= ${ASMR:S/.o/.S/}
51
52SPSEUDO= ${PSEUDO:S/.o/.S/}
53
40SPSEUDO= ${PSEUDO:S/.o/.S/}
41
54SPSEUDOR= ${PSEUDOR:S/.o/.S/}
42SRCS+= ${SASM} ${SPSEUDO}
55
43
56SRCS+= ${SASM} ${SASMR} ${SPSEUDO} ${SPSEUDOR}
57
58# Generated files
44# Generated files
59CLEANFILES+= ${SASM} ${SASMR} ${SPSEUDO} ${SPSEUDOR}
45CLEANFILES+= ${SASM} ${SPSEUDO}
60
61${SASM}:
62 printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
63
46
47${SASM}:
48 printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
49
64${SASMR}:
65 printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.TARGET}
66
67${SPSEUDO}:
50${SPSEUDO}:
68 printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' \
51 printf '#include "SYS.h"\nPSEUDO(${.PREFIX:S/_//})\n' \
69 > ${.TARGET}
70
52 > ${.TARGET}
53
71${SPSEUDOR}:
72 printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' \
73 > ${.TARGET}
74
75.if ${LIB} == "c"
76MAN2+= _exit.2 accept.2 access.2 acct.2 adjtime.2 \
77 aio_cancel.2 aio_error.2 aio_read.2 aio_return.2 \
78 aio_suspend.2 aio_waitcomplete.2 aio_write.2 \
79 bind.2 brk.2 chdir.2 chflags.2 \
80 chmod.2 chown.2 chroot.2 clock_gettime.2 close.2 \
81 connect.2 dup.2 execve.2 \
82 fcntl.2 fhopen.2 flock.2 fork.2 fsync.2 \

--- 74 unchanged lines hidden ---
54.if ${LIB} == "c"
55MAN2+= _exit.2 accept.2 access.2 acct.2 adjtime.2 \
56 aio_cancel.2 aio_error.2 aio_read.2 aio_return.2 \
57 aio_suspend.2 aio_waitcomplete.2 aio_write.2 \
58 bind.2 brk.2 chdir.2 chflags.2 \
59 chmod.2 chown.2 chroot.2 clock_gettime.2 close.2 \
60 connect.2 dup.2 execve.2 \
61 fcntl.2 fhopen.2 flock.2 fork.2 fsync.2 \

--- 74 unchanged lines hidden ---