]> git.saurik.com Git - apple/libc.git/blame - pthreads/Makefile.inc
Libc-498.1.7.tar.gz
[apple/libc.git] / pthreads / Makefile.inc
CommitLineData
b5d655f7 1.sinclude "${.CURDIR}/${MACHINE_ARCH}/pthreads/Makefile.inc"
9385eb3d 2
59e0d9fe
A
3.PATH: ${.CURDIR}/pthreads
4
224c7076
A
5CFLAGS += -I${.CURDIR}/pthreads
6
7MISRCS += pthread_cancelable.c pthread_cond.c pthread_tsd.c pthread.c \
8 pthread_mutex.c thread_setup.c stack.s pthread_rwlock.c
9
b5d655f7
A
10.ifdef FEATURE_PLOCKSTAT
11${SYMROOTINC}/plockstat.h: ${.CURDIR}/pthreads/plockstat.d
12 mkdir -p ${SYMROOTINC}
224c7076
A
13 dtrace -o ${.TARGET} -C -h -s ${.ALLSRC}
14
15.for _src in pthread_cond.c pthread_mutex.c pthread_rwlock.c
b5d655f7 16${_src:R}.${OBJSUFFIX}: ${SYMROOTINC}/plockstat.h
224c7076 17.endfor
b5d655f7 18.endif # FEATURE_PLOCKSTAT
5b2abdfb
A
19
20PTHREADS_INSTHDRS += pthread.h pthread_impl.h sched.h
21PTHREADS_INSTHDRS := ${PTHREADS_INSTHDRS:S/^/${.CURDIR}\/pthreads\//}
22INSTHDRS += ${PTHREADS_INSTHDRS}
23
224c7076
A
24PRIV_INSTHDRS += ${.CURDIR}/pthreads/pthread_machdep.h
25LOCALHDRS += ${.CURDIR}/pthreads/pthread_workqueue.h
26
27LEGACYSRCS += pthread.c pthread_cancelable.c pthread_cond.c pthread_mutex.c pthread_rwlock.c
28CANCELABLESRCS += pthread_cancelable.c
29
30# thread_setup.c can only compile with __DARWIN_UNIX03=0 (for ppc64) because
31# the structure field names are renamed with __ prefix when __DARWIN_UNIX03=1.
32# If thread_setup.c ever needs to build variant, this will have to be fix
33# properly
34CFLAGS-thread_setup.c = -U__DARWIN_UNIX03 -D__DARWIN_UNIX03=0
35
36# set the LIBC_ALIAS_* macros so we can decorate the symbol independent
37# of other macro settings
38CFLAGS-pthread.c += -DLIBC_ALIAS_PTHREAD_CANCEL -DLIBC_ALIAS_PTHREAD_SETCANCELSTATE -DLIBC_ALIAS_PTHREAD_SETCANCELTYPE -DLIBC_ALIAS_PTHREAD_SIGMASK -DLIBC_ALIAS_PTHREAD_TESTCANCEL
39CFLAGS-pthread_cancelable.c += -DLIBC_ALIAS_PTHREAD_COND_TIMEDWAIT -DLIBC_ALIAS_PTHREAD_COND_WAIT -DLIBC_ALIAS_PTHREAD_JOIN -DLIBC_ALIAS_SIGWAIT
40CFLAGS-pthread_cond.c += -DLIBC_ALIAS_PTHREAD_COND_INIT
41CFLAGS-pthread_mutex.c += -DLIBC_ALIAS_PTHREAD_MUTEXATTR_DESTROY
42CFLAGS-pthread_rwlock.c += -DLIBC_ALIAS_PTHREAD_RWLOCK_DESTROY -DLIBC_ALIAS_PTHREAD_RWLOCK_INIT -DLIBC_ALIAS_PTHREAD_RWLOCK_RDLOCK -DLIBC_ALIAS_PTHREAD_RWLOCK_TRYRDLOCK -DLIBC_ALIAS_PTHREAD_RWLOCK_TRYWRLOCK -DLIBC_ALIAS_PTHREAD_RWLOCK_UNLOCK -DLIBC_ALIAS_PTHREAD_RWLOCK_WRLOCK
43
44STRIP_HDRS += pthread.h
3d9156a7 45
5b2abdfb 46.if ${LIB} == "c"
3d9156a7 47MAN3+= pthread.3 pthread_atfork.3 pthread_attr.3 pthread_cancel.3 \
5b2abdfb
A
48 pthread_cleanup_pop.3 pthread_cleanup_push.3 \
49 pthread_cond_broadcast.3 pthread_cond_destroy.3 \
50 pthread_cond_init.3 pthread_cond_signal.3 \
51 pthread_cond_timedwait.3 pthread_cond_wait.3 \
52 pthread_create.3 pthread_detach.3 \
53 pthread_equal.3 pthread_exit.3 \
54 pthread_getschedparam.3 pthread_getspecific.3 \
55 pthread_join.3 pthread_key_create.3 \
56 pthread_key_delete.3 pthread_mutex_destroy.3 \
57 pthread_mutex_init.3 pthread_mutex_lock.3 \
58 pthread_mutex_trylock.3 pthread_mutex_unlock.3 \
59 pthread_mutexattr.3 pthread_once.3 \
60 pthread_self.3 pthread_setcancelstate.3 \
61 pthread_setspecific.3 pthread_condattr.3 \
62 pthread_rwlock_destroy.3 pthread_rwlock_init.3 \
63 pthread_rwlock_rdlock.3 pthread_rwlock_unlock.3 \
64 pthread_rwlock_wrlock.3 pthread_rwlockattr_destroy.3 \
65 pthread_rwlockattr_getpshared.3 pthread_rwlockattr_init.3 \
66 pthread_rwlockattr_setpshared.3
67
224c7076
A
68MLINKS+= pthread_attr.3 pthread_attr_destroy.3 \
69 pthread_attr.3 pthread_attr_getdetachstate.3 \
70 pthread_attr.3 pthread_attr_getinheritsched.3 \
71 pthread_attr.3 pthread_attr_getschedparam.3 \
72 pthread_attr.3 pthread_attr_getschedpolicy.3 \
73 pthread_attr.3 pthread_attr_getscope.3 \
74 pthread_attr.3 pthread_attr_getstackaddr.3 \
75 pthread_attr.3 pthread_attr_getstacksize.3 \
76 pthread_attr.3 pthread_attr_init.3 \
77 pthread_attr.3 pthread_attr_setdetachstate.3 \
78 pthread_attr.3 pthread_attr_setinheritsched.3 \
79 pthread_attr.3 pthread_attr_setschedparam.3 \
80 pthread_attr.3 pthread_attr_setschedpolicy.3 \
81 pthread_attr.3 pthread_attr_setscope.3 \
82 pthread_attr.3 pthread_attr_setstackaddr.3 \
83 pthread_attr.3 pthread_attr_setstacksize.3
84
85MLINKS+= pthread_getschedparam.3 pthread_setschedparam.3
86
87MLINKS+= pthread_mutexattr.3 pthread_mutexattr_destroy.3 \
88 pthread_mutexattr.3 pthread_mutexattr_getprioceiling.3 \
89 pthread_mutexattr.3 pthread_mutexattr_getprotocol.3 \
90 pthread_mutexattr.3 pthread_mutexattr_gettype.3 \
91 pthread_mutexattr.3 pthread_mutexattr_init.3 \
92 pthread_mutexattr.3 pthread_mutexattr_setprioceiling.3 \
93 pthread_mutexattr.3 pthread_mutexattr_setprotocol.3 \
94 pthread_mutexattr.3 pthread_mutexattr_settype.3
95
96MLINKS+= pthread_setcancelstate.3 pthread_setcanceltype.3 \
97 pthread_setcancelstate.3 pthread_testcancel.3
98
99MLINKS+= pthread_condattr.3 pthread_condattr_destroy.3 \
100 pthread_condattr.3 pthread_condattr_init.3
101
102MLINKS+= pthread_rwlock_rdlock.3 pthread_rwlock_tryrdlock.3
103
104MLINKS+= pthread_rwlock_wrlock.3 pthread_rwlock_trywrlock.3
5b2abdfb
A
105
106.endif
107
108