1# $FreeBSD: releng/10.2/lib/libthr/support/Makefile.inc 212516 2010-09-13 01:43:10Z imp $ 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 9CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} 10.else 11.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys 12CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH} 13.endif 14 15SYSCALLS= thr_new 16 17SYSCALL_SRC= ${SYSCALLS:S/$/.S/} 18SYSCALL_OBJ= ${SYSCALLS:S/$/.So/} 19 20${SYSCALL_SRC}: 21 printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET} 22 23LIBC_OBJS= 24 25SOBJS+= thr_libc.So 26CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS} 27 28thr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS} 29 ${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC} 30