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