56953f0b4494033ea1dee0b4a577effa5f826d06
[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.h
15 URCU_SIGNAL_YIELD=${LIBDIR}/urcu-yield.o ${LIBDIR}/urcu.h
16 URCU_MB=${LIBDIR}/urcu-mb.o ${LIBDIR}/urcu.h
17 URCU_QSBR=${LIBDIR}/urcu-qsbr.o ${LIBDIR}/urcu-qsbr.h
18
19 all: test_urcu test_urcu_dynamic_link test_urcu_timing \
20 test_rwlock_timing test_rwlock test_perthreadlock_timing \
21 test_perthreadlock test_urcu_yield test_urcu_mb \
22 urcu-asm.S test_qsbr_timing test_qsbr urcu-asm.o urcutorture \
23 urcutorture-yield test_mutex test_looplen test_urcu_gc \
24 test_urcu_gc_mb test_qsbr_gc test_qsbr_lgc test_urcu_lgc \
25 test_urcu_lgc_mb test_qsbr_dynamic_link
26
27 api.h: ${APIHEADER}
28 cp -f ${APIHEADER} api.h
29
30 test_looplen: test_looplen.c ${LIBDIR}/urcu.h
31 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
32
33
34 test_urcu: test_urcu.c ${URCU_SIGNAL}
35 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
36
37 test_urcu_gc: test_urcu_gc.c ${URCU_SIGNAL}
38 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
39
40 test_urcu_lgc: test_urcu_gc.c ${URCU_SIGNAL}
41 $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
42
43
44 test_urcu_mb: test_urcu.c ${URCU_MB}
45 $(CC) -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
46
47 test_urcu_gc_mb: test_urcu_gc.c ${URCU_MB}
48 $(CC) -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
49
50 test_urcu_lgc_mb: test_urcu_gc.c ${URCU_MB}
51 $(CC) -DTEST_LOCAL_GC -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
52
53
54 test_qsbr: test_qsbr.c ${URCU_QSBR}
55 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
56
57 test_qsbr_gc: test_qsbr_gc.c ${URCU_QSBR}
58 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
59
60 test_qsbr_lgc: test_qsbr_gc.c ${URCU_QSBR}
61 $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
62
63 test_qsbr_dynamic_link: test_qsbr.c ${URCU_QSBR}
64 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
65
66
67 test_rwlock: test_rwlock.c ${URCU_SIGNAL}
68 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
69
70 test_perthreadlock: test_perthreadlock.c ${URCU_SIGNAL}
71 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
72
73 test_mutex: test_mutex.c ${URCU_SIGNAL}
74 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
75
76 test_urcu_dynamic_link: test_urcu.c ${URCU_SIGNAL}
77 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
78
79
80 test_urcu_yield: test_urcu.c ${URCU_SIGNAL_YIELD}
81 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
82
83 test_urcu_timing: test_urcu_timing.c ${URCU_SIGNAL}
84 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
85
86 test_qsbr_timing: test_qsbr_timing.c ${URCU_QSBR}
87 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
88
89 test_rwlock_timing: test_rwlock_timing.c ${URCU_SIGNAL}
90 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
91
92 test_perthreadlock_timing: test_perthreadlock_timing.c ${URCU_SIGNAL}
93 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
94
95 urcu-asm.S: urcu-asm.c ${LIBDIR}/urcu.h
96 $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP)
97
98 urcu-asm.o: urcu-asm.c ${LIBDIR}/urcu.h
99 $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
100
101 urcutorture: urcutorture.c rcutorture.h api.h ${URCU_SIGNAL}
102 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
103
104 urcutorture-yield: urcutorture.c ${URCU_SIGNAL_YIELD} rcutorture.h api.h
105 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
106
107 ,PHONY: clean
108
109 clean:
110 rm -f *.o test_urcu test_urcu_dynamic_link test_urcu_timing \
111 test_rwlock_timing test_rwlock test_perthreadlock_timing \
112 test_perthreadlock test_urcu_yield test_urcu_mb \
113 urcu-asm.S test_qsbr_timing test_qsbr urcutorture \
114 urcutorture-yield liburcu.so api.h \
115 test_mutex test_urcu_gc test_urcu_gc_mb urcu-asm-1.S \
116 test_qsbr_lgc test_qsbr_gc test_looplen test_urcu_lgc \
117 test_urcu_lgc_mb
This page took 0.044519 seconds and 3 git commands to generate.