Makefile.inc revision 1.20
1#	$NetBSD: Makefile.inc,v 1.20 2011/01/14 05:20:00 matt Exp $
2
3# sys sources
4.PATH: ${.CURDIR}/sys
5.PATH: ${ARCHDIR}/sys
6
7# stubs providing an entry "foo" but calling "__posix_foo()"
8PSEUDO=		chown.S fchown.S lchown.S rename.S
9
10SRCS+=		${PSEUDO}
11CLEANFILES+=	${PSEUDO}
12
13SRCS+=		cerror.S
14CPPFLAGS+=	-D__cerror=__posix_cerror
15
16ASMDEPS=	${.CURDIR}/sys/Makefile.inc ${ARCHDIR}/SYS.h \
17		${DESTDIR}/usr/include/sys/syscall.h
18
19${PSEUDO}: ${ASMDEPS}
20	${_MKTARGET_CREATE}
21	printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/^/__posix_/})\n' \
22		>${.TARGET}
23
24# Lint stubs for all automatically-generated assembly stubs (GENERATED)
25.if ${MKLINT} != "no"
26LSRCS+=		LintSysPseudo.c
27DPSRCS+=	LintSysPseudo.c
28CLEANFILES+=	LintSysPseudo.c
29.endif
30
31LintSysPseudo.c: ${NETBSDSRCDIR}/lib/libc/sys/makelintstub \
32    ${DESTDIR}/usr/include/sys/syscall.h
33	${_MKTARGET_CREATE}
34	CPP=${CPP:Q} ${HOST_SH} ${NETBSDSRCDIR}/lib/libc/sys/makelintstub \
35	    -o ${.TARGET} -p -s ${DESTDIR}/usr/include/sys/syscall.h ${PSEUDO}
36