makefile update
[urcu.git] / tests / Makefile.inc
CommitLineData
833dbdb6
MD
1
2include ../Makefile.build.inc
3
4ifeq ($(findstring ${ARCHTYPE},"x86 ppc"),)
5APIHEADER=api_gcc.h
6else
7APIHEADER=api_${ARCHTYPE}.h
8endif
9
10LIBDIR=..
11
12CFLAGS+=-I ${LIBDIR}
13
14URCU_SIGNAL=${LIBDIR}/urcu.o ${LIBDIR}/urcu.h
15URCU_SIGNAL_YIELD=${LIBDIR}/urcu-yield.o ${LIBDIR}/urcu.h
16URCU_MB=${LIBDIR}/urcu-mb.o ${LIBDIR}/urcu.h
17URCU_QSBR=${LIBDIR}/urcu-qsbr.o ${LIBDIR}/urcu-qsbr.h
786ee85b 18URCU_MB_DEFER=${LIBDIR}/urcu-mb.o ${LIBDIR}/urcu-defer.o ${LIBDIR}/urcu.h
833dbdb6
MD
19
20all: test_urcu test_urcu_dynamic_link test_urcu_timing \
21 test_rwlock_timing test_rwlock test_perthreadlock_timing \
22 test_perthreadlock test_urcu_yield test_urcu_mb \
23 urcu-asm.S test_qsbr_timing test_qsbr urcu-asm.o urcutorture \
24 urcutorture-yield test_mutex test_looplen test_urcu_gc \
25 test_urcu_gc_mb test_qsbr_gc test_qsbr_lgc test_urcu_lgc \
b55487c7
MD
26 test_urcu_lgc_mb test_qsbr_dynamic_link test_urcu_mb_defer \
27 test_atomic
833dbdb6
MD
28
29api.h: ${APIHEADER}
30 cp -f ${APIHEADER} api.h
31
32test_looplen: test_looplen.c ${LIBDIR}/urcu.h
33 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
34
35
36test_urcu: test_urcu.c ${URCU_SIGNAL}
37 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
38
39test_urcu_gc: test_urcu_gc.c ${URCU_SIGNAL}
40 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
41
42test_urcu_lgc: test_urcu_gc.c ${URCU_SIGNAL}
43 $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
44
45
46test_urcu_mb: test_urcu.c ${URCU_MB}
0a1d290b 47 $(CC) -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
833dbdb6
MD
48
49test_urcu_gc_mb: test_urcu_gc.c ${URCU_MB}
0a1d290b 50 $(CC) -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
833dbdb6
MD
51
52test_urcu_lgc_mb: test_urcu_gc.c ${URCU_MB}
0a1d290b 53 $(CC) -DTEST_LOCAL_GC -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
833dbdb6 54
786ee85b 55test_urcu_mb_defer: test_urcu_defer.c ${URCU_MB_DEFER}
90075a50
MD
56 $(CC) -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
57
833dbdb6
MD
58
59test_qsbr: test_qsbr.c ${URCU_QSBR}
60 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
61
62test_qsbr_gc: test_qsbr_gc.c ${URCU_QSBR}
63 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
64
65test_qsbr_lgc: test_qsbr_gc.c ${URCU_QSBR}
66 $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
67
7ac06cef
MD
68test_qsbr_dynamic_link: test_qsbr.c ${URCU_QSBR}
69 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
70
833dbdb6
MD
71
72test_rwlock: test_rwlock.c ${URCU_SIGNAL}
73 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
74
75test_perthreadlock: test_perthreadlock.c ${URCU_SIGNAL}
76 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
77
78test_mutex: test_mutex.c ${URCU_SIGNAL}
79 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
80
81test_urcu_dynamic_link: test_urcu.c ${URCU_SIGNAL}
82 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
83
84
85test_urcu_yield: test_urcu.c ${URCU_SIGNAL_YIELD}
86 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
87
88test_urcu_timing: test_urcu_timing.c ${URCU_SIGNAL}
89 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
90
91test_qsbr_timing: test_qsbr_timing.c ${URCU_QSBR}
92 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
93
94test_rwlock_timing: test_rwlock_timing.c ${URCU_SIGNAL}
95 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
96
97test_perthreadlock_timing: test_perthreadlock_timing.c ${URCU_SIGNAL}
98 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
99
100urcu-asm.S: urcu-asm.c ${LIBDIR}/urcu.h
101 $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP)
102
103urcu-asm.o: urcu-asm.c ${LIBDIR}/urcu.h
104 $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
105
106urcutorture: urcutorture.c rcutorture.h api.h ${URCU_SIGNAL}
107 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
108
109urcutorture-yield: urcutorture.c ${URCU_SIGNAL_YIELD} rcutorture.h api.h
110 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
111
a81b8e5e
MD
112test_atomic: test_atomic.c ../arch_atomic.h
113 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
114
833dbdb6
MD
115,PHONY: clean
116
117clean:
118 rm -f *.o test_urcu test_urcu_dynamic_link test_urcu_timing \
119 test_rwlock_timing test_rwlock test_perthreadlock_timing \
120 test_perthreadlock test_urcu_yield test_urcu_mb \
121 urcu-asm.S test_qsbr_timing test_qsbr urcutorture \
122 urcutorture-yield liburcu.so api.h \
123 test_mutex test_urcu_gc test_urcu_gc_mb urcu-asm-1.S \
124 test_qsbr_lgc test_qsbr_gc test_looplen test_urcu_lgc \
13ba7e6d 125 test_urcu_lgc_mb test_qsbr_dynamic_link test_urcu_mb_defer
This page took 0.038607 seconds and 4 git commands to generate.