Makefile revision 1.10
11.10Sthorpej# $NetBSD: Makefile,v 1.10 2003/01/19 19:55:13 thorpej 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.9SthorpejCPPFLAGS+= -I${ARCHDIR} -I${.CURDIR} -I${.OBJDIR} 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.9SthorpejSRCS+= pthread_specific.c 531.9SthorpejSRCS+= pthread_stack.c 541.9SthorpejSRCS+= pthread_debug.c 551.9SthorpejSRCS+= sched.c 561.9Sthorpej# Architecture-dependent files 571.9SthorpejSRCS+= pthread_switch.S _context_u.S 581.9Sthorpej.if exists(${ARCHDIR}/pthread_md.c) 591.9SthorpejSRCS+= pthread_md.c 601.9Sthorpej.endif 611.9Sthorpej 621.9Sthorpejpthread_switch.S _context_u.S: assym.h 631.9Sthorpej 641.9Sthorpejdebuglog: debuglog.o 651.9Sthorpej $(CC) -o debuglog debuglog.o -lpthread 661.1Sproven 671.1Sproven.include <bsd.lib.mk> 681.1Sproven 691.9Sthorpej.else 701.9Sthorpej 711.9Sthorpej.include <bsd.man.mk> 721.10Sthorpej.include <bsd.files.mk> 731.10Sthorpej.include <bsd.inc.mk> 741.9Sthorpej 751.9Sthorpej.endif 761.9Sthorpej 771.9Sthorpej# WARNS=2 sets -Wcast-qual. This causes problems for one of 781.9Sthorpej# pthread_setspecific() and pthread_getspecific(), since the constness 791.9Sthorpej# of the argument to setspecific() has to be discarded *somewhere* 801.9Sthorpej# before returning it from getspecific(). 811.9SthorpejCFLAGS+= -Wno-cast-qual 82