1 # $NetBSD: Makefile.inc,v 1.15 2012/11/28 21:39:59 martin Exp $ 2 3 .include <bsd.own.mk> 4 5 # This is called with MACHINE=sparc64 && MACHINE_ARCH=sparc when building 6 # 32 bit kernels for ultrasparc hardware 7 .if ${MACHINE} == "sparc64" 8 9 SPARC64DIR= ${.PARSEDIR}/../../sparc64/atomic 10 .PATH.c: ${SPARC64DIR} 11 .PATH.S: ${SPARC64DIR} 12 13 .include "${SPARC64DIR}/Makefile.inc" 14 15 .else 16 17 . if defined(LIB) 18 19 . if (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread" \ 20 || ${LIB} == "rump") 21 SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \ 22 atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \ 23 atomic_inc_32_cas.c atomic_inc_32_nv_cas.c atomic_or_32_cas.c \ 24 atomic_or_32_nv_cas.c atomic_swap_32_cas.c membar_ops.S 25 . endif 26 27 . if (${LIB} == "kern" || ${LIB} == "rump") 28 SRCS+= atomic_cas.S 29 . endif 30 31 . if (${LIB} == "c" || ${LIB} == "pthread") 32 CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_UP 33 SRCS+= atomic_init_testset.c atomic_cas_up.S 34 . endif 35 36 . endif 37 38 .endif 39