summaryrefslogtreecommitdiff
path: root/lib/libc_r/sys/Makefile.inc
blob: 79b6afe2a4d59246d74fe6641dff5d343406d990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#	$Id: Makefile.inc,v 1.4 1999/11/25 07:01:29 d Exp $
#	$OpenBSD: Makefile.inc,v 1.4 1999/11/25 07:01:29 d Exp $

.PATH:	 ${.CURDIR}/sys ${.CURDIR}/arch/${MACHINE_ARCH}

SRCS+=	uthread_error.c _atomic_lock.c slow_atomic_lock.c

SRCS+= _sys_aliases.c
CLEANFILES += _sys_aliases.c
_sys_aliases.c: ${.CURDIR}/Makefile ${LIBCSRCDIR}/sys/Makefile.inc
	echo '#include <sys/cdefs.h>' > ${.TARGET}
.if ${MACHINE} == "alpha"
	# This kludge will disappear when we shift to -lpthread
	echo '#define __indr_reference(old,new)' \
		'__asm__(".globl "#new";"#new": jmp $$31,"#old)' > ${.TARGET}

.endif
	for fn in ${ASM:R} ${PSEUDO:R} ""; do \
	    case $$fn in ${HIDDEN_SYSCALLS:.o=|}"") : stays hidden ;; \
	    		 *) echo "__indr_reference(_thread_sys_$$fn,$$fn);";; \
	     esac; \
	 done >> ${.TARGET}