1# $NetBSD: Makefile.inc,v 1.14 2009/03/13 19:16:46 abs 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 9SPARC64DIR= ${.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") 21SRCS+= 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") 28SRCS+= atomic_cas.S 29. endif 30 31. if (${LIB} == "c" || ${LIB} == "pthread") 32SRCS+= atomic_init_testset.c 33. endif 34 35. endif 36 37.endif 38