Cleanup: Check for pthread in Libc
[urcu.git] / tests / regression / Makefile.am
CommitLineData
0e1efa0e 1if !LIBC_INCLUDES_PTHREAD
f5ab766e 2AM_LDFLAGS=-lpthread
58a052ef 3endif
f5ab766e
MD
4AM_CFLAGS=-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/tests/common -g
5
6noinst_PROGRAMS = test_urcu_fork \
7 rcutorture_urcu \
8 rcutorture_urcu_signal \
9 rcutorture_urcu_mb \
10 rcutorture_urcu_bp \
11 rcutorture_urcu_qsbr
12
13noinst_HEADERS = rcutorture.h
14
15if COMPAT_ARCH
16COMPAT=$(top_srcdir)/compat_arch_@ARCHTYPE@.c
17else
18COMPAT=
19endif
20
21if COMPAT_FUTEX
22COMPAT+=$(top_srcdir)/compat_futex.c
23endif
24
25URCU=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfcqueue.c $(COMPAT)
26URCU_QSBR=$(top_srcdir)/urcu-qsbr.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfcqueue.c $(COMPAT)
27# URCU_MB uses urcu.c but -DRCU_MB must be defined
28URCU_MB=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfcqueue.c $(COMPAT)
29# URCU_SIGNAL uses urcu.c but -DRCU_SIGNAL must be defined
30URCU_SIGNAL=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfcqueue.c $(COMPAT)
31URCU_BP=$(top_srcdir)/urcu-bp.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfcqueue.c $(COMPAT)
32URCU_DEFER=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfcqueue.c $(COMPAT)
33
34URCU_COMMON_LIB=$(top_builddir)/liburcu-common.la
35URCU_LIB=$(top_builddir)/liburcu.la
36URCU_QSBR_LIB=$(top_builddir)/liburcu-qsbr.la
37URCU_MB_LIB=$(top_builddir)/liburcu-mb.la
38URCU_SIGNAL_LIB=$(top_builddir)/liburcu-signal.la
39URCU_BP_LIB=$(top_builddir)/liburcu-bp.la
40URCU_CDS_LIB=$(top_builddir)/liburcu-cds.la
41
42test_urcu_fork_SOURCES = test_urcu_fork.c $(URCU)
43
44rcutorture_urcu_SOURCES = urcutorture.c
45rcutorture_urcu_CFLAGS = -DRCU_MEMBARRIER $(AM_CFLAGS)
46rcutorture_urcu_LDADD = $(URCU)
47
48rcutorture_urcu_mb_SOURCES = urcutorture.c
49rcutorture_urcu_mb_CFLAGS = -DRCU_MB $(AM_CFLAGS)
50rcutorture_urcu_mb_LDADD = $(URCU_MB_LIB)
51
52rcutorture_urcu_qsbr_SOURCES = urcutorture.c
53rcutorture_urcu_qsbr_CFLAGS = -DTORTURE_QSBR -DRCU_QSBR $(AM_CFLAGS)
54rcutorture_urcu_qsbr_LDADD = $(URCU_QSBR_LIB)
55
56rcutorture_urcu_signal_SOURCES = urcutorture.c
57rcutorture_urcu_signal_CFLAGS = -DRCU_SIGNAL $(AM_CFLAGS)
58rcutorture_urcu_signal_LDADD = $(URCU_SIGNAL_LIB)
59
60rcutorture_urcu_bp_SOURCES = urcutorture.c
61rcutorture_urcu_bp_CFLAGS = -DRCU_BP $(AM_CFLAGS)
62rcutorture_urcu_bp_LDADD = $(URCU_BP_LIB)
63
64urcutorture.c: ../common/api.h
65
66.PHONY: regtest
67
68# For now, run the benchmarks too as regression tests.
69# TODO: split benchmarks from regression tests
70regtest:
71 ./test_urcu_fork
72 ./rcutorture_urcu
73 ./rcutorture_urcu_signal
74 ./rcutorture_urcu_mb
75 ./rcutorture_urcu_bp
76 ./rcutorture_urcu_qsbr
77 cd ../benchmark && ./runall.sh && cd ..
This page took 0.034859 seconds and 4 git commands to generate.