Makefile.inc revision 1.12
1#	$NetBSD: Makefile.inc,v 1.12 2014/02/24 16:15:43 martin Exp $
2
3.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread" \
4	|| ${LIB} == "rump")
5
6.if ${MACHINE_ARCH:Mmips64*} == ""
7SRCS+=	atomic_add_32_cas.c atomic_add_32_nv_cas.c \
8	atomic_and_32_cas.c atomic_and_32_nv_cas.c \
9	atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
10	atomic_inc_32_cas.c atomic_inc_32_nv_cas.c \
11	atomic_or_32_cas.c atomic_or_32_nv_cas.c \
12	atomic_swap_32_cas.c \
13	atomic_add_64_cas.c atomic_add_64_nv_cas.c \
14	atomic_and_64_cas.c atomic_and_64_nv_cas.c \
15	atomic_dec_64_cas.c atomic_dec_64_nv_cas.c \
16	atomic_inc_64_cas.c atomic_inc_64_nv_cas.c \
17	atomic_or_64_cas.c atomic_or_64_nv_cas.c \
18	atomic_swap_64_cas.c
19
20CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_UP
21
22.else
23SRCS+=	atomic_add.S atomic_dec.S atomic_inc.S
24SRCS+=	atomic_and.S atomic_or.S
25SRCS+=	atomic_swap.S
26.endif
27
28SRCS+=	membar_ops.S
29.endif
30
31.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
32
33.if ${MACHINE_ARCH:Mmips64*} == ""
34SRCS+=	atomic_init_testset.c atomic_cas_up.S
35.else
36SRCS+=	atomic_cas.S atomic_init_cas.c atomic_cas_by_cas32.c
37.endif
38
39.endif
40
41.if defined(LIB) && ${LIB} == "c"
42SRCS+=	atomic_xor_32_cas.c atomic_xor_16_cas.c atomic_xor_8_cas.c	\
43	atomic_sub_32_cas.c atomic_sub_16_cas.c atomic_sub_8_cas.c	\
44	atomic_nand_32_cas.c atomic_nand_16_cas.c atomic_nand_8_cas.c	\
45	atomic_or_16_cas.c atomic_or_8_cas.c				\
46	atomic_and_16_cas.c atomic_and_8_cas.c				\
47	atomic_add_16_cas.c atomic_add_8_cas.c				\
48	atomic_swap_16_cas.c atomic_swap_8_cas.c			\
49	atomic_cas_32_cas.c atomic_cas_16_cas.c atomic_cas_8_cas.c
50.endif
51
52.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "rump")
53
54SRCS+=	membar_ops.S
55
56.endif
57