1145436Sdavidxu# $FreeBSD: releng/10.2/lib/libthr/support/Makefile.inc 212516 2010-09-13 01:43:10Z imp $ 2145436Sdavidxu 3145436Sdavidxu.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string 4212516Simp 5212516Simp# libc must search machine_arch, then machine_cpuarch, but libthr has all its 6212516Simp# code implemented in machine_cpuarch. Cope. 7212516Simp.if exists(${.CURDIR}/../libc/${MACHINE_ARCH}/sys) 8145436Sdavidxu.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys 9145436SdavidxuCFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} 10212516Simp.else 11212516Simp.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys 12212516SimpCFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH} 13212516Simp.endif 14145436Sdavidxu 15145436SdavidxuSYSCALLS= thr_new 16145436Sdavidxu 17145436SdavidxuSYSCALL_SRC= ${SYSCALLS:S/$/.S/} 18145436SdavidxuSYSCALL_OBJ= ${SYSCALLS:S/$/.So/} 19145436Sdavidxu 20145436Sdavidxu${SYSCALL_SRC}: 21145436Sdavidxu printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET} 22145436Sdavidxu 23145436SdavidxuLIBC_OBJS= 24145436Sdavidxu 25145436SdavidxuSOBJS+= thr_libc.So 26145436SdavidxuCLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS} 27145436Sdavidxu 28145436Sdavidxuthr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS} 29145436Sdavidxu ${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC} 30