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