]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - lib/libthr/support/Makefile.inc
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / lib / libthr / support / Makefile.inc
1 # $FreeBSD$
2
3 .PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string
4
5 # libc must search machine_arch, then machine_cpuarch, but libthr has all its
6 # code implemented in machine_cpuarch.  Cope.
7 .if exists(${.CURDIR}/../libc/${MACHINE_ARCH}/sys)
8 .PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys
9 CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH}
10 .else
11 .PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys
12 CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH}
13 .endif
14
15 SYSCALLS= thr_new
16
17 SYSCALL_SRC=   ${SYSCALLS:S/$/.S/}
18 SYSCALL_OBJ=   ${SYSCALLS:S/$/.So/}
19
20 ${SYSCALL_SRC}:
21         printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
22
23 LIBC_OBJS=
24
25 SOBJS+= thr_libc.So
26 CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS}
27
28 thr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS}
29         ${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC}