2 include ../Makefile.build.inc
4 ifeq ($(findstring ${ARCHTYPE},"x86 ppc"),)
7 APIHEADER=api_${ARCHTYPE}.h
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
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
28 cp -f ${APIHEADER} api.h
30 test_looplen: test_looplen.c ${LIBDIR}/urcu.h
31 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
34 test_urcu: test_urcu.c ${URCU_SIGNAL}
35 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
37 test_urcu_gc: test_urcu_gc.c ${URCU_SIGNAL}
38 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
40 test_urcu_lgc: test_urcu_gc.c ${URCU_SIGNAL}
41 $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
44 test_urcu_mb: test_urcu.c ${URCU_MB}
45 $(CC) -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
47 test_urcu_gc_mb: test_urcu_gc.c ${URCU_MB}
48 $(CC) -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
50 test_urcu_lgc_mb: test_urcu_gc.c ${URCU_MB}
51 $(CC) -DTEST_LOCAL_GC -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
54 test_qsbr: test_qsbr.c ${URCU_QSBR}
55 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
57 test_qsbr_gc: test_qsbr_gc.c ${URCU_QSBR}
58 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
60 test_qsbr_lgc: test_qsbr_gc.c ${URCU_QSBR}
61 $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
63 test_qsbr_dynamic_link: test_qsbr.c ${URCU_QSBR}
64 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
67 test_rwlock: test_rwlock.c ${URCU_SIGNAL}
68 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
70 test_perthreadlock: test_perthreadlock.c ${URCU_SIGNAL}
71 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
73 test_mutex: test_mutex.c ${URCU_SIGNAL}
74 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
76 test_urcu_dynamic_link: test_urcu.c ${URCU_SIGNAL}
77 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
80 test_urcu_yield: test_urcu.c ${URCU_SIGNAL_YIELD}
81 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
83 test_urcu_timing: test_urcu_timing.c ${URCU_SIGNAL}
84 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
86 test_qsbr_timing: test_qsbr_timing.c ${URCU_QSBR}
87 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
89 test_rwlock_timing: test_rwlock_timing.c ${URCU_SIGNAL}
90 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
92 test_perthreadlock_timing: test_perthreadlock_timing.c ${URCU_SIGNAL}
93 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
95 urcu-asm.S: urcu-asm.c ${LIBDIR}/urcu.h
96 $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP)
98 urcu-asm.o: urcu-asm.c ${LIBDIR}/urcu.h
99 $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
101 urcutorture: urcutorture.c rcutorture.h api.h ${URCU_SIGNAL}
102 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
104 urcutorture-yield: urcutorture.c ${URCU_SIGNAL_YIELD} rcutorture.h api.h
105 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
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 \