Makefile.inc revision 1.3 1 # $NetBSD: Makefile.inc,v 1.3 2019/04/17 07:40:34 mrg Exp $
2
3 .for op in add and cas nand or sub swap xor
4 sizes=32
5 .if "${MLIBDIR}" != ""
6 .if ${COMMON_MACHINE_ARCH} == "riscv64"
7 sizes+=64
8 .endif
9 .elif ${MACHINE_ARCH} == "riscv64"
10 sizes+=64
11 .endif
12 .for sz in ${sizes}
13 SRCS.atomic+= atomic_${op}_${sz}.S
14 .endfor
15 .for sz in 8 16
16 SRCS.atomic+= atomic_${op}_${sz}_cas.c
17 .endfor
18 .endfor
19 SRCS.atomic+= membar_ops.S
20 SRCS.atomic+= atomic_cas_by_cas32.c
21
22 .if defined(LIB) && (${LIB} != "kern" && ${LIB} != "rump")
23
24 SRCS.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
30 .if ${LIB} == "c"
31 SRCS.atomic+= atomic_and_16_nv_cas.c atomic_and_8_nv_cas.c
32 .endif
33
34 SRCS+= ${SRCS.atomic}
35