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