1#	$NetBSD: Makefile.inc,v 1.2 2014/10/16 18:52:17 dennis Exp $
2
3.for op in add and cas nand or sub swap xor
4sizes=32
5.if "${MLIBDIR}" != ""
6.if ${COMMON_MACHINE_ARCH} == "riscv64"
7sizes+=64
8.endif
9.elif ${MACHINE_ARCH} == "riscv64"
10sizes+=64
11.endif
12.for sz in ${sizes}
13SRCS.atomic+=	atomic_${op}_${sz}.S
14.endfor
15.for sz in 8 16
16SRCS.atomic+=	atomic_${op}_${sz}_cas.c
17.endfor
18.endfor
19SRCS.atomic+=	membar_ops.S
20SRCS.atomic+=	atomic_cas_by_cas32.c
21
22.if defined(LIB) && (${LIB} != "kern" && ${LIB} != "rump")
23
24SRCS.atomic+=	atomic_init_cas.c			\
25		atomic_c11_compare_exchange_cas_16.c    \
26		atomic_c11_compare_exchange_cas_8.c
27
28.endif #LIB
29
30SRCS+=	${SRCS.atomic}
31