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