jcs's openbsd hax
openbsd
1# $OpenBSD: Makefile,v 1.57 2025/07/17 02:21:44 deraadt Exp $
2
3LIB=pthread
4LIBCSRCDIR= ${.CURDIR}/../libc
5
6CFLAGS+=-Wall -g -Werror -Wshadow
7CFLAGS+=-Werror-implicit-function-declaration
8CFLAGS+=-Wsign-compare
9CFLAGS+=-I${.CURDIR} -include namespace.h \
10 -I${LIBCSRCDIR}/arch/${MACHINE_CPU} -I${LIBCSRCDIR}/include
11CDIAGFLAGS=
12LDADD = -Wl,-znodelete
13PFLAGS= -D__PROFIL_SRC__
14
15.if defined(NOPIC)
16CFLAGS+=-DNO_PIC
17.endif
18
19VERSION_SCRIPT= ${.CURDIR}/Symbols.map
20
21.PATH: ${.CURDIR}/arch/${MACHINE_CPU}
22SRCS= rthread.c \
23 rthread_attr.c \
24 rthread_barrier.c \
25 rthread_barrier_attr.c \
26 rthread_fork.c \
27 rthread_getcpuclockid.c \
28 rthread_mutex_prio.c \
29 rthread_mutexattr.c \
30 rthread_np.c \
31 rthread_rwlockattr.c \
32 rthread_sched.c \
33 rthread_stack.c \
34 rthread_spin_lock.c \
35 sched_prio.c
36
37# Architectures without atomics
38.if ${MACHINE_ARCH} == "hppa" || ${MACHINE_ARCH} == "m88k" || \
39 ${MACHINE_ARCH} == "sh"
40SRCS+= rthread_sem_compat.c \
41 rthread_rwlock_compat.c
42.else
43CFLAGS+= -DFUTEX
44SRCS+= rthread_sem.c \
45 rthread_rwlock.c
46.endif
47
48SRCDIR= ${.CURDIR}/../libpthread
49.include "${SRCDIR}/man/Makefile.inc"
50.include <bsd.lib.mk>
51
52${OBJS} ${GOBJS} ${POBJS} ${SOBJS} ${DOBJS}: ${.CURDIR}/namespace.h