Commit | Line | Data |
---|---|---|
58a052ef | 1 | if !TARGET_IS_ANDROID |
f5ab766e | 2 | AM_LDFLAGS=-lpthread |
58a052ef | 3 | endif |
f5ab766e MD |
4 | AM_CFLAGS=-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/tests/common -g |
5 | ||
6 | noinst_PROGRAMS = test_urcu_fork \ | |
7 | rcutorture_urcu \ | |
8 | rcutorture_urcu_signal \ | |
9 | rcutorture_urcu_mb \ | |
10 | rcutorture_urcu_bp \ | |
11 | rcutorture_urcu_qsbr | |
12 | ||
13 | noinst_HEADERS = rcutorture.h | |
14 | ||
15 | if COMPAT_ARCH | |
16 | COMPAT=$(top_srcdir)/compat_arch_@ARCHTYPE@.c | |
17 | else | |
18 | COMPAT= | |
19 | endif | |
20 | ||
21 | if COMPAT_FUTEX | |
22 | COMPAT+=$(top_srcdir)/compat_futex.c | |
23 | endif | |
24 | ||
25 | URCU=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfcqueue.c $(COMPAT) | |
26 | URCU_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 | |
28 | URCU_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 | |
30 | URCU_SIGNAL=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfcqueue.c $(COMPAT) | |
31 | URCU_BP=$(top_srcdir)/urcu-bp.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfcqueue.c $(COMPAT) | |
32 | URCU_DEFER=$(top_srcdir)/urcu.c $(top_srcdir)/urcu-pointer.c $(top_srcdir)/wfcqueue.c $(COMPAT) | |
33 | ||
34 | URCU_COMMON_LIB=$(top_builddir)/liburcu-common.la | |
35 | URCU_LIB=$(top_builddir)/liburcu.la | |
36 | URCU_QSBR_LIB=$(top_builddir)/liburcu-qsbr.la | |
37 | URCU_MB_LIB=$(top_builddir)/liburcu-mb.la | |
38 | URCU_SIGNAL_LIB=$(top_builddir)/liburcu-signal.la | |
39 | URCU_BP_LIB=$(top_builddir)/liburcu-bp.la | |
40 | URCU_CDS_LIB=$(top_builddir)/liburcu-cds.la | |
41 | ||
42 | test_urcu_fork_SOURCES = test_urcu_fork.c $(URCU) | |
43 | ||
44 | rcutorture_urcu_SOURCES = urcutorture.c | |
45 | rcutorture_urcu_CFLAGS = -DRCU_MEMBARRIER $(AM_CFLAGS) | |
46 | rcutorture_urcu_LDADD = $(URCU) | |
47 | ||
48 | rcutorture_urcu_mb_SOURCES = urcutorture.c | |
49 | rcutorture_urcu_mb_CFLAGS = -DRCU_MB $(AM_CFLAGS) | |
50 | rcutorture_urcu_mb_LDADD = $(URCU_MB_LIB) | |
51 | ||
52 | rcutorture_urcu_qsbr_SOURCES = urcutorture.c | |
53 | rcutorture_urcu_qsbr_CFLAGS = -DTORTURE_QSBR -DRCU_QSBR $(AM_CFLAGS) | |
54 | rcutorture_urcu_qsbr_LDADD = $(URCU_QSBR_LIB) | |
55 | ||
56 | rcutorture_urcu_signal_SOURCES = urcutorture.c | |
57 | rcutorture_urcu_signal_CFLAGS = -DRCU_SIGNAL $(AM_CFLAGS) | |
58 | rcutorture_urcu_signal_LDADD = $(URCU_SIGNAL_LIB) | |
59 | ||
60 | rcutorture_urcu_bp_SOURCES = urcutorture.c | |
61 | rcutorture_urcu_bp_CFLAGS = -DRCU_BP $(AM_CFLAGS) | |
62 | rcutorture_urcu_bp_LDADD = $(URCU_BP_LIB) | |
63 | ||
64 | urcutorture.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 | |
70 | regtest: | |
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 .. |