1 1.8.2.21 thorpej # $NetBSD: Makefile,v 1.8.2.21 2003/01/08 19:34:21 thorpej Exp $ 2 1.8.2.1 nathanw # 3 1.8.2.6 nathanw 4 1.8.2.6 nathanw WARNS= 2 5 1.8.2.9 thorpej 6 1.8.2.9 thorpej .include <bsd.own.mk> 7 1.1 proven 8 1.8.2.1 nathanw .if exists(${.CURDIR}/arch/${MACHINE_ARCH}) 9 1.8.2.1 nathanw ARCHSUBDIR= ${MACHINE_ARCH} 10 1.8.2.1 nathanw .elif exists(${.CURDIR}/arch/${MACHINE_CPU}) 11 1.8.2.1 nathanw ARCHSUBDIR= ${MACHINE_CPU} 12 1.8.2.1 nathanw .else 13 1.8.2.1 nathanw .BEGIN: 14 1.8.2.17 thorpej @echo "no ARCHSUBDIR for ${MACHINE_ARCH}/${MACHINE_CPU}; skipping..." 15 1.8.2.1 nathanw .endif 16 1.8.2.1 nathanw 17 1.8.2.17 thorpej .if defined(ARCHSUBDIR) 18 1.8.2.17 thorpej 19 1.8.2.1 nathanw ARCHDIR= ${.CURDIR}/arch/${ARCHSUBDIR} 20 1.8.2.1 nathanw .PATH: ${ARCHDIR} 21 1.8.2.1 nathanw 22 1.8.2.11 nathanw CPPFLAGS+= -I${ARCHDIR} -I${.CURDIR} -I${.OBJDIR} 23 1.8.2.13 thorpej 24 1.8.2.1 nathanw DPSRCS+= assym.h 25 1.8.2.1 nathanw 26 1.8.2.1 nathanw assym.h: genassym.sh ${ARCHDIR}/genassym.cf 27 1.8.2.1 nathanw sh ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 28 1.8.2.1 nathanw < ${ARCHDIR}/genassym.cf > assym.h.tmp && \ 29 1.8.2.1 nathanw mv -f assym.h.tmp assym.h 30 1.8.2.1 nathanw 31 1.8.2.1 nathanw LIB= pthread 32 1.8.2.10 nathanw 33 1.8.2.21 thorpej # 34 1.8.2.21 thorpej # NOTE: When you create a new file for libpthread, make sure that pthread.c 35 1.8.2.21 thorpej # gets a reference to a symbol in that file. Otherwise, Unix's stupid static 36 1.8.2.21 thorpej # library semantics will end up discarding potentially important objects. 37 1.8.2.21 thorpej # 38 1.8.2.10 nathanw SRCS= pthread.c 39 1.8.2.10 nathanw SRCS+= pthread_alarms.c 40 1.8.2.20 thorpej SRCS+= pthread_barrier.c 41 1.8.2.10 nathanw SRCS+= pthread_cancelstub.c 42 1.8.2.10 nathanw SRCS+= pthread_cond.c 43 1.8.2.10 nathanw SRCS+= pthread_lock.c 44 1.8.2.10 nathanw SRCS+= pthread_mutex.c 45 1.8.2.10 nathanw SRCS+= pthread_run.c 46 1.8.2.19 nathanw SRCS+= pthread_rwlock.c 47 1.8.2.10 nathanw SRCS+= pthread_sa.c 48 1.8.2.10 nathanw SRCS+= pthread_sig.c 49 1.8.2.10 nathanw SRCS+= pthread_specific.c 50 1.8.2.7 nathanw SRCS+= pthread_stack.c 51 1.8.2.4 nathanw SRCS+= pthread_debug.c 52 1.8.2.1 nathanw SRCS+= sched.c 53 1.8.2.3 nathanw # Architecture-dependent files 54 1.8.2.3 nathanw SRCS+= pthread_switch.S _context_u.S 55 1.8.2.16 nathanw .if exists(${ARCHDIR}/pthread_md.c) 56 1.8.2.16 nathanw SRCS+= pthread_md.c 57 1.8.2.16 nathanw .endif 58 1.8.2.3 nathanw 59 1.8.2.8 nathanw pthread_switch.S _context_u.S: assym.h 60 1.8.2.1 nathanw 61 1.8.2.13 thorpej INCS= pthread.h pthread_types.h pthread_queue.h 62 1.8.2.1 nathanw INCSDIR=/usr/include 63 1.8.2.4 nathanw 64 1.8.2.4 nathanw debuglog: debuglog.o 65 1.8.2.4 nathanw $(CC) -o debuglog debuglog.o -lpthread 66 1.8.2.17 thorpej 67 1.8.2.1 nathanw .include <bsd.lib.mk> 68 1.8.2.7 nathanw 69 1.8.2.18 thorpej .else 70 1.8.2.18 thorpej 71 1.8.2.18 thorpej .include <bsd.man.mk> 72 1.8.2.18 thorpej 73 1.8.2.18 thorpej .endif 74 1.8.2.18 thorpej 75 1.8.2.7 nathanw # WARNS=2 sets -Wcast-qual. This causes problems for one of 76 1.8.2.7 nathanw # pthread_setspecific() and pthread_getspecific(), since the constness 77 1.8.2.7 nathanw # of the argument to setspecific() has to be discarded *somewhere* 78 1.8.2.7 nathanw # before returning it from getspecific(). 79 1.8.2.7 nathanw CFLAGS+= -Wno-cast-qual 80