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