995c0bd08f8cd16912bdbeafd5f212b249a1f130
[urcu.git] / tests / Makefile.am
1 AM_LDFLAGS=-lpthread
2 AM_CFLAGS=-I$(top_srcdir) -I$(top_builddir)
3
4 noinst_PROGRAMS = test_urcu test_urcu_dynamic_link test_urcu_timing \
5 test_rwlock_timing test_rwlock test_perthreadlock_timing \
6 test_perthreadlock test_urcu_yield test_urcu_mb \
7 test_qsbr_timing test_qsbr rcutorture_urcu \
8 rcutorture_urcu_mb rcutorture_urcu_bp rcutorture_qsbr \
9 test_mutex test_looplen test_urcu_gc \
10 test_urcu_gc_mb test_qsbr_gc test_qsbr_lgc test_urcu_lgc \
11 test_urcu_lgc_mb test_qsbr_dynamic_link test_urcu_mb_defer \
12 test_uatomic test_urcu_assign test_urcu_assign_dynamic_link \
13 test_urcu_bp test_urcu_bp_dynamic_link
14 noinst_HEADERS = rcutorture.h
15
16 if COMPAT_ARCH
17 COMPAT=$(top_srcdir)/compat_arch_@ARCHTYPE@.c
18 else
19 COMPAT=
20 endif
21
22 if COMPAT_FUTEX
23 COMPAT+=$(top_srcdir)/compat_futex.c
24 endif
25
26 URCU_SIGNAL=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(COMPAT)
27 # URCU_SIGNAL_YIELD uses urcu.c but -DDEBUG_YIELD must be defined
28 URCU_SIGNAL_YIELD=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(COMPAT)
29 # URCU_MB uses urcu.c but -DURCU_MB must be defined
30 URCU_MB=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(COMPAT)
31 URCU_BP=$(top_srcdir)/urcu-bp.c $(top_srcdir)/urcu-pointer.c $(COMPAT)
32 URCU_QSBR=$(top_srcdir)/urcu-qsbr.c $(top_srcdir)/urcu-pointer.c $(COMPAT)
33 # -DURCU_MB must be defined
34 URCU_MB_DEFER=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-defer.c $(top_srcdir)/urcu-pointer.c $(COMPAT)
35
36 URCU_SIGNAL_LIB=$(top_builddir)/liburcu.la
37 URCU_MB_LIB=$(top_builddir)/liburcu-mb.la
38 URCU_BP_LIB=$(top_builddir)/liburcu-bp.la
39 URCU_QSBR_LIB=$(top_builddir)/liburcu-qsbr.la
40
41 if GCC_API
42 APIHEADER=api_gcc.h
43 else
44 APIHEADER=api_@ARCHTYPE@.h
45 endif
46
47 EXTRA_DIST = $(top_srcdir)/tests/api_*.h
48
49
50 test_urcu_SOURCES = test_urcu.c $(URCU_SIGNAL)
51
52 test_urcu_dynamic_link_SOURCES = test_urcu.c $(URCU_SIGNAL)
53 test_urcu_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
54
55 test_urcu_timing_SOURCES = test_urcu_timing.c $(URCU_SIGNAL)
56
57 test_rwlock_timing_SOURCES = test_rwlock_timing.c $(URCU_SIGNAL)
58
59 test_rwlock_SOURCES = test_rwlock.c $(URCU_SIGNAL)
60
61 test_perthreadlock_timing_SOURCES = test_perthreadlock_timing.c $(URCU_SIGNAL)
62
63 test_perthreadlock_SOURCES = test_perthreadlock.c $(URCU_SIGNAL)
64
65 test_urcu_yield_SOURCES = test_urcu.c $(URCU_SIGNAL_YIELD)
66 test_urcu_yield_CFLAGS = -DDEBUG_YIELD $(AM_CFLAGS)
67
68 test_urcu_mb_SOURCES = test_urcu.c $(URCU_MB)
69 test_urcu_mb_CFLAGS = -DURCU_MB $(AM_CFLAGS)
70
71 test_qsbr_timing_SOURCES = test_qsbr_timing.c $(URCU_QSBR)
72
73 test_qsbr_SOURCES = test_qsbr.c $(URCU_QSBR)
74
75 rcutorture_urcu_SOURCES = urcutorture.c
76 rcutorture_urcu_CFLAGS = -DTORTURE_URCU_SIGNAL $(AM_CFLAGS)
77 rcutorture_urcu_LDADD = $(URCU_SIGNAL_LIB)
78
79 rcutorture_urcu_mb_SOURCES = urcutorture.c
80 rcutorture_urcu_mb_CFLAGS = -DTORTURE_URCU_MB $(AM_CFLAGS)
81 rcutorture_urcu_mb_LDADD = $(URCU_MB_LIB)
82
83 rcutorture_qsbr_SOURCES = urcutorture.c
84 rcutorture_qsbr_CFLAGS = -DTORTURE_QSBR $(AM_CFLAGS)
85 rcutorture_qsbr_LDADD = $(URCU_QSBR_LIB)
86
87 rcutorture_urcu_bp_SOURCES = urcutorture.c
88 rcutorture_urcu_bp_CFLAGS = -DTORTURE_URCU_BP $(AM_CFLAGS)
89 rcutorture_urcu_bp_LDADD = $(URCU_BP_LIB)
90
91 test_mutex_SOURCES = test_mutex.c $(URCU_SIGNAL)
92
93 test_looplen_SOURCES = test_looplen.c
94
95 test_urcu_gc_SOURCES = test_urcu_gc.c $(URCU_SIGNAL)
96
97 test_urcu_gc_mb_SOURCES = test_urcu_gc.c $(URCU_MB)
98 test_urcu_gc_mb_CFLAGS = -DURCU_MB $(AM_CFLAGS)
99
100 test_qsbr_gc_SOURCES = test_qsbr_gc.c $(URCU_QSBR)
101
102 test_qsbr_lgc_SOURCES = test_qsbr_gc.c $(URCU_QSBR)
103 test_qsbr_lgc_CFLAGS = -DTEST_LOCAL_GC $(AM_CFLAGS)
104
105 test_urcu_lgc_SOURCES = test_urcu_gc.c $(URCU_SIGNAL)
106 test_urcu_lgc_CFLAGS = -DTEST_LOCAL_GC $(AM_CFLAGS)
107
108 test_urcu_lgc_mb_SOURCES = test_urcu_gc.c $(URCU_MB)
109 test_urcu_lgc_mb_CFLAGS = -DTEST_LOCAL_GC -DURCU_MB $(AM_CFLAGS)
110
111 test_qsbr_dynamic_link_SOURCES = test_qsbr.c $(URCU_QSBR)
112 test_qsbr_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
113
114 test_urcu_mb_defer_SOURCES = test_urcu_defer.c $(URCU_MB_DEFER)
115 test_urcu_mb_defer_CFLAGS = -DURCU_MB $(AM_CFLAGS)
116
117 test_uatomic_SOURCES = test_uatomic.c
118
119 test_urcu_assign_SOURCES = test_urcu_assign.c $(URCU_SIGNAL)
120
121 test_urcu_assign_dynamic_link_SOURCES = test_urcu_assign.c $(URCU_SIGNAL)
122 test_urcu_assign_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
123
124 test_urcu_bp_SOURCES = test_urcu_bp.c $(URCU_BP)
125
126 test_urcu_bp_dynamic_link_SOURCES = test_urcu_bp.c $(URCU_BP)
127 test_urcu_bp_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
128
129 urcutorture.c: api.h
130
131 api.h: $(APIHEADER)
132 cp -f $(srcdir)/$(APIHEADER) api.h
133
134 clean-local:
135 rm -f api.h
This page took 0.032392 seconds and 3 git commands to generate.