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