diff options
-rw-r--r-- | lib/libkse/Makefile | 6 | ||||
-rw-r--r-- | lib/libkse/support/Makefile.inc | 36 | ||||
-rw-r--r-- | lib/libpthread/Makefile | 6 | ||||
-rw-r--r-- | lib/libpthread/support/Makefile.inc | 36 |
4 files changed, 64 insertions, 20 deletions
diff --git a/lib/libkse/Makefile b/lib/libkse/Makefile index 31c09dc..3d7c890 100644 --- a/lib/libkse/Makefile +++ b/lib/libkse/Makefile @@ -39,9 +39,3 @@ PRECIOUSLIB= yes .include "${.CURDIR}/thread/Makefile.inc" .include <bsd.lib.mk> - -# Can't put thr_support.c in SRCS but want it in .depend. -${DEPENDFILE}: thr_support.c - -# LIBC_PIC is defined only after <bsd.lib.mk> is included. -thr_libc.So: ${LIBC_PIC} diff --git a/lib/libkse/support/Makefile.inc b/lib/libkse/support/Makefile.inc index 1b445ab..c8176b3 100644 --- a/lib/libkse/support/Makefile.inc +++ b/lib/libkse/support/Makefile.inc @@ -1,9 +1,37 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/support +.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string + +CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} + +SYSCALLS= clock_gettime \ + kse_create \ + kse_exit \ + kse_release \ + kse_thr_interrupt \ + kse_wakeup \ + sigaction \ + sigprocmask \ + sigtimedwait \ + write + +SYSCALL_SRC= ${SYSCALLS:S/$/.S/} +SYSCALL_OBJ= ${SYSCALLS:S/$/.So/} + +${SYSCALL_SRC}: + printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET} + +LIBC_OBJS= sigsetops.So \ + bcopy.So \ + bzero.So \ + memcpy.So \ + memset.So \ + strcpy.So \ + strlen.So SOBJS+= thr_libc.So -CLEANFILES+= thr_support.So +CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS} + +thr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS} + ${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC} -thr_libc.So: thr_support.So - ${CC} -nostdlib -o ${.TARGET} -r thr_support.So -lc_pic diff --git a/lib/libpthread/Makefile b/lib/libpthread/Makefile index 31c09dc..3d7c890 100644 --- a/lib/libpthread/Makefile +++ b/lib/libpthread/Makefile @@ -39,9 +39,3 @@ PRECIOUSLIB= yes .include "${.CURDIR}/thread/Makefile.inc" .include <bsd.lib.mk> - -# Can't put thr_support.c in SRCS but want it in .depend. -${DEPENDFILE}: thr_support.c - -# LIBC_PIC is defined only after <bsd.lib.mk> is included. -thr_libc.So: ${LIBC_PIC} diff --git a/lib/libpthread/support/Makefile.inc b/lib/libpthread/support/Makefile.inc index 1b445ab..c8176b3 100644 --- a/lib/libpthread/support/Makefile.inc +++ b/lib/libpthread/support/Makefile.inc @@ -1,9 +1,37 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/support +.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string + +CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} + +SYSCALLS= clock_gettime \ + kse_create \ + kse_exit \ + kse_release \ + kse_thr_interrupt \ + kse_wakeup \ + sigaction \ + sigprocmask \ + sigtimedwait \ + write + +SYSCALL_SRC= ${SYSCALLS:S/$/.S/} +SYSCALL_OBJ= ${SYSCALLS:S/$/.So/} + +${SYSCALL_SRC}: + printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET} + +LIBC_OBJS= sigsetops.So \ + bcopy.So \ + bzero.So \ + memcpy.So \ + memset.So \ + strcpy.So \ + strlen.So SOBJS+= thr_libc.So -CLEANFILES+= thr_support.So +CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS} + +thr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS} + ${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC} -thr_libc.So: thr_support.So - ${CC} -nostdlib -o ${.TARGET} -r thr_support.So -lc_pic |