Makefile revision 1.17
11.17Snathanw# $NetBSD: Makefile,v 1.17 2003/06/03 21:34:00 nathanw Exp $ 21.9Sthorpej# 31.9Sthorpej 41.9SthorpejWARNS= 2 51.9Sthorpej 61.9Sthorpej.include <bsd.own.mk> 71.9Sthorpej 81.9Sthorpej.if exists(${.CURDIR}/arch/${MACHINE_ARCH}) 91.9SthorpejARCHSUBDIR= ${MACHINE_ARCH} 101.9Sthorpej.elif exists(${.CURDIR}/arch/${MACHINE_CPU}) 111.9SthorpejARCHSUBDIR= ${MACHINE_CPU} 121.9Sthorpej.else 131.9Sthorpej.BEGIN: 141.10Sthorpej @echo "WARNING: no ARCHSUBDIR for ${MACHINE_ARCH}/${MACHINE_CPU}; skipping..." 151.9Sthorpej.endif 161.9Sthorpej 171.10SthorpejINCS= pthread.h pthread_types.h pthread_queue.h 181.10SthorpejINCSDIR=/usr/include 191.10Sthorpej 201.9Sthorpej.if defined(ARCHSUBDIR) 211.9Sthorpej 221.9SthorpejARCHDIR= ${.CURDIR}/arch/${ARCHSUBDIR} 231.9Sthorpej.PATH: ${ARCHDIR} 241.9Sthorpej 251.11SchristosCPPFLAGS+= -I${ARCHDIR} -I${.CURDIR} -I${.OBJDIR} -D_LIBC 261.9Sthorpej 271.9SthorpejDPSRCS+= assym.h 281.9Sthorpej 291.9Sthorpejassym.h: genassym.sh ${ARCHDIR}/genassym.cf 301.9Sthorpej sh ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 311.9Sthorpej < ${ARCHDIR}/genassym.cf > assym.h.tmp && \ 321.9Sthorpej mv -f assym.h.tmp assym.h 331.9Sthorpej 341.9SthorpejLIB= pthread 351.9Sthorpej 361.9Sthorpej# 371.9Sthorpej# NOTE: When you create a new file for libpthread, make sure that pthread.c 381.9Sthorpej# gets a reference to a symbol in that file. Otherwise, Unix's stupid static 391.9Sthorpej# library semantics will end up discarding potentially important objects. 401.9Sthorpej# 411.9SthorpejSRCS= pthread.c 421.9SthorpejSRCS+= pthread_alarms.c 431.9SthorpejSRCS+= pthread_barrier.c 441.9SthorpejSRCS+= pthread_cancelstub.c 451.9SthorpejSRCS+= pthread_cond.c 461.9SthorpejSRCS+= pthread_lock.c 471.9SthorpejSRCS+= pthread_mutex.c 481.9SthorpejSRCS+= pthread_run.c 491.9SthorpejSRCS+= pthread_rwlock.c 501.9SthorpejSRCS+= pthread_sa.c 511.9SthorpejSRCS+= pthread_sig.c 521.16SnathanwSRCS+= pthread_sleep.c 531.9SthorpejSRCS+= pthread_specific.c 541.9SthorpejSRCS+= pthread_stack.c 551.9SthorpejSRCS+= pthread_debug.c 561.9SthorpejSRCS+= sched.c 571.11SchristosSRCS+= sem.c 581.9Sthorpej# Architecture-dependent files 591.9SthorpejSRCS+= pthread_switch.S _context_u.S 601.9Sthorpej.if exists(${ARCHDIR}/pthread_md.c) 611.9SthorpejSRCS+= pthread_md.c 621.9Sthorpej.endif 631.17Snathanw 641.17SnathanwMAN+= pthread_attr.3 \ 651.17Snathanw pthread_barrier_destroy.3 pthread_barrier_init.3 \ 661.17Snathanw pthread_barrier_wait.3 pthread_barrierattr.3 \ 671.17Snathanw pthread_cancel.3 pthread_cleanup_push.3 \ 681.17Snathanw pthread_cond_broadcast.3 pthread_cond_destroy.3 pthread_cond_init.3 \ 691.17Snathanw pthread_cond_wait.3 \ 701.17Snathanw pthread_condattr.3 pthread_create.3 pthread_detach.3 pthread_equal.3 \ 711.17Snathanw pthread_exit.3 pthread_getspecific.3 pthread_join.3 \ 721.17Snathanw pthread_key_create.3 pthread_key_delete.3 pthread_kill.3 \ 731.17Snathanw pthread_mutex_destroy.3 pthread_mutex_init.3 pthread_mutex_lock.3 \ 741.17Snathanw pthread_mutex_unlock.3 pthread_mutexattr.3 \ 751.17Snathanw pthread_once.3 pthread_rwlock_destroy.3 pthread_rwlock_init.3 \ 761.17Snathanw pthread_rwlock_rdlock.3 pthread_rwlock_unlock.3 \ 771.17Snathanw pthread_rwlock_wrlock.3 pthread_rwlockattr.3 \ 781.17Snathanw pthread_schedparam.3 pthread_self.3 \ 791.17Snathanw pthread_setspecific.3 pthread_sigmask.3 pthread_spin_destroy.3 \ 801.17Snathanw pthread_spin_init.3 pthread_spin_lock.3 pthread_spin_unlock.3 \ 811.17Snathanw pthread_testcancel.3 821.17Snathanw 831.17SnathanwMLINKS+= pthread_attr.3 pthread_attr_init.3 841.17SnathanwMLINKS+= pthread_attr.3 pthread_attr_destroy.3 851.17SnathanwMLINKS+= pthread_attr.3 pthread_attr_setdetachstate.3 861.17SnathanwMLINKS+= pthread_attr.3 pthread_attr_getdetachstate.3 871.17SnathanwMLINKS+= pthread_barrierattr.3 pthread_barierattr_init.3 881.17SnathanwMLINKS+= pthread_barrierattr.3 pthread_barierattr_destroy.3 891.17SnathanwMLINKS+= pthread_cleanup_push.3 pthread_cleanup_pop.3 901.17SnathanwMLINKS+= pthread_cond_broadcast.3 pthread_cond_signal.3 911.17SnathanwMLINKS+= pthread_cond_wait.3 pthread_cond_timedwait.3 921.17SnathanwMLINKS+= pthread_condattr.3 pthread_condattr_init.3 931.17SnathanwMLINKS+= pthread_condattr.3 pthread_condattr_destroy.3 941.17SnathanwMLINKS+= pthread_mutex_lock.3 pthread_mutex_trylock.3 951.17SnathanwMLINKS+= pthread_mutexattr.3 pthread_mutexattr_init.3 961.17SnathanwMLINKS+= pthread_mutexattr.3 pthread_mutexattr_destroy.3 971.17SnathanwMLINKS+= pthread_mutexattr.3 pthread_mutexattr_settype.3 981.17SnathanwMLINKS+= pthread_mutexattr.3 pthread_mutexattr_gettype.3 991.17SnathanwMLINKS+= pthread_rwlock_rdlock.3 pthread_rwlock_timedrdlock.3 1001.17SnathanwMLINKS+= pthread_rwlock_rdlock.3 pthread_rwlock_tryrdlock.3 1011.17SnathanwMLINKS+= pthread_rwlock_wrlock.3 pthread_rwlock_timedwrlock.3 1021.17SnathanwMLINKS+= pthread_rwlock_wrlock.3 pthread_rwlock_trywrlock.3 1031.17SnathanwMLINKS+= pthread_rwlockattr.3 pthread_rwlockattr_init.3 1041.17SnathanwMLINKS+= pthread_rwlockattr.3 pthread_rwlockattr_destroy.3 1051.17SnathanwMLINKS+= pthread_schedparam.3 pthread_setschedparam.3 1061.17SnathanwMLINKS+= pthread_schedparam.3 pthread_getschedparam.3 1071.17SnathanwMLINKS+= pthread_testcancel.3 pthread_setcancelstate.3 1081.17SnathanwMLINKS+= pthread_testcancel.3 pthread_setcanceltype.3 1091.9Sthorpej 1101.9Sthorpejpthread_switch.S _context_u.S: assym.h 1111.9Sthorpej 1121.9Sthorpejdebuglog: debuglog.o 1131.9Sthorpej $(CC) -o debuglog debuglog.o -lpthread 1141.1Sproven 1151.1Sproven.include <bsd.lib.mk> 1161.1Sproven 1171.9Sthorpej.else 1181.9Sthorpej 1191.9Sthorpej.include <bsd.man.mk> 1201.10Sthorpej.include <bsd.files.mk> 1211.10Sthorpej.include <bsd.inc.mk> 1221.9Sthorpej 1231.9Sthorpej.endif 1241.9Sthorpej 1251.9Sthorpej# WARNS=2 sets -Wcast-qual. This causes problems for one of 1261.9Sthorpej# pthread_setspecific() and pthread_getspecific(), since the constness 1271.9Sthorpej# of the argument to setspecific() has to be discarded *somewhere* 1281.9Sthorpej# before returning it from getspecific(). 1291.9SthorpejCFLAGS+= -Wno-cast-qual 130