freebsd-skq/lib/libthr/support/Makefile.inc
Enji Cooper 58368ba984 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:32:19 +00:00

30 lines
827 B
Makefile

# $FreeBSD$
.PATH: ${.CURDIR}/support ${SRCTOP}/lib/libc/gen ${SRCTOP}/lib/libc/string
# libc must search machine_arch, then machine_cpuarch, but libthr has all its
# code implemented in machine_cpuarch. Cope.
.if exists(${SRCTOP}/lib/libc/${MACHINE_ARCH}/sys)
.PATH: ${SRCTOP}/lib/libc/${MACHINE_ARCH}/sys
CFLAGS+= -I${SRCTOP}/lib/libc/${MACHINE_ARCH}
.else
.PATH: ${SRCTOP}/lib/libc/${MACHINE_CPUARCH}/sys
CFLAGS+= -I${SRCTOP}/lib/libc/${MACHINE_CPUARCH}
.endif
SYSCALLS= thr_new
SYSCALL_SRC= ${SYSCALLS:S/$/.S/}
SYSCALL_OBJ= ${SYSCALLS:S/$/.pico/}
${SYSCALL_SRC}:
printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
LIBC_OBJS=
SOBJS+= thr_libc.pico
CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS}
thr_libc.pico: ${SYSCALL_OBJ} ${LIBC_OBJS}
${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC}