1 # $NetBSD: Makefile,v 1.8.2.7 2001/08/08 16:39:33 nathanw Exp $ 2 # 3 4 WARNS= 2 5 6 .if exists(${.CURDIR}/arch/${MACHINE_ARCH}) 7 ARCHSUBDIR= ${MACHINE_ARCH} 8 .elif exists(${.CURDIR}/arch/${MACHINE_CPU}) 9 ARCHSUBDIR= ${MACHINE_CPU} 10 .else 11 .BEGIN: 12 @echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU} 13 @false 14 .endif 15 16 ARCHDIR= ${.CURDIR}/arch/${ARCHSUBDIR} 17 AINC= -I${ARCHDIR} 18 .PATH: ${ARCHDIR} 19 20 CPPFLAGS+= ${AINC} -I${.CURDIR} -I${.OBJDIR} 21 22 DPSRCS+= assym.h 23 24 assym.h: genassym.sh ${ARCHDIR}/genassym.cf 25 sh ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 26 < ${ARCHDIR}/genassym.cf > assym.h.tmp && \ 27 mv -f assym.h.tmp assym.h 28 29 LIB= pthread 30 SRCS= pthread.c pthread_cond.c pthread_lock.c pthread_mutex.c 31 SRCS+= pthread_run.c pthread_sa.c pthread_sig.c pthread_specific.c 32 SRCS+= pthread_stack.c 33 SRCS+= pthread_debug.c 34 SRCS+= sched.c 35 # Architecture-dependent files 36 SRCS+= pthread_switch.S _context_u.S 37 38 39 INCS= pthread.h pthread_types.h pthread_queue.h sched.h 40 INCSDIR=/usr/include 41 42 debuglog: debuglog.o 43 $(CC) -o debuglog debuglog.o -lpthread 44 45 .include <bsd.lib.mk> 46 47 # WARNS=2 sets -Wcast-qual. This causes problems for one of 48 # pthread_setspecific() and pthread_getspecific(), since the constness 49 # of the argument to setspecific() has to be discarded *somewhere* 50 # before returning it from getspecific(). 51 CFLAGS+= -Wno-cast-qual 52 53 54 # DO NOT DELETE 55