Add QSBR RCU timing tests
[urcu.git] / Makefile
CommitLineData
27b012e2 1
121a5d44 2CFLAGS=-Wall -O2 -g -I.
bb488185
MD
3LDFLAGS=-lpthread
4
20bf310a
MD
5#debug
6#CFLAGS=-Wall -g
bb488185 7#CFLAGS+=-DDEBUG_FULL_MB
20bf310a 8
121a5d44
MD
9#Changing the signal number used by the library. SIGUSR1 by default.
10#CFLAGS+=-DSIGURCU=SIGUSR2
11
102d1d23 12SRC_DEP=`echo $^ | sed 's/[^ ]*\.h//g'`
20bf310a 13
d2d23035 14all: arch-api test_urcu test_urcu_dynamic_link test_urcu_timing \
102d1d23 15 test_rwlock_timing test_perthreadlock_timing test_urcu_yield urcu-asm.S \
420e5b92 16 test_qsbr_timing urcu-asm.o urcutorture urcutorture-yield liburcu.so
20bf310a 17
d2d23035
MD
18arch-api: api.h arch.h
19 # Run either make pthreads-x86 or make pthreads-ppc prior to build
20 # the RCU library. Architecture auto-detectection not implemented
21 # in the build system yet.
22
2d6debff
PM
23pthreads-x86: clean
24 cp api_x86.h api.h
25 cp arch_x86.h arch.h
0114ba7f 26 cp arch_atomic_x86.h arch_atomic.h
2d6debff
PM
27
28pthreads-ppc: clean
29 cp api_ppc.h api.h
30 cp arch_ppc.h arch.h
0114ba7f 31 cp arch_atomic_ppc.h arch_atomic.h
2d6debff 32
1430ee0b 33test_urcu: urcu.o test_urcu.c urcu.h
20bf310a
MD
34 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
35
121a5d44
MD
36test_urcu_dynamic_link: urcu.o test_urcu.c urcu.h
37 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
38
1430ee0b 39test_urcu_yield: urcu-yield.o test_urcu.c urcu.h
cf380c2f
MD
40 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
41
1430ee0b 42test_urcu_timing: urcu.o test_urcu_timing.c urcu.h
20bf310a
MD
43 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
44
420e5b92
MD
45test_qsbr_timing: urcu-qsbr.o test_qsbr_timing.c urcu-qsbr.h
46 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
47
1430ee0b 48test_rwlock_timing: urcu.o test_rwlock_timing.c urcu.h
20bf310a 49 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
27b012e2 50
102d1d23
MD
51test_perthreadlock_timing: urcu.o test_perthreadlock_timing.c urcu.h
52 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
53
27b012e2 54urcu.o: urcu.c urcu.h
121a5d44
MD
55 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
56
420e5b92
MD
57urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
58 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
59
121a5d44
MD
60liburcu.so: urcu.o
61 $(CC) -fPIC -shared -o $@ $<
c777f0b1 62
cf380c2f
MD
63urcu-yield.o: urcu.c urcu.h
64 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
65
1430ee0b
MD
66urcu-asm.S: urcu-asm.c urcu.h
67 $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP)
68
69urcu-asm.o: urcu-asm.c urcu.h
70 $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
71
e7b43771 72urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h
e462817e
MD
73 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
74
9b171f46
MD
75urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h
76 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
77
d2d23035 78.PHONY: clean install arch-api
121a5d44
MD
79
80install: liburcu.so
81 cp -f liburcu.so /usr/lib/
0114ba7f 82 cp -f arch.h arch_atomic.h compiler.h urcu.h urcu-static.h /usr/include/
c777f0b1
MD
83
84clean:
1430ee0b 85 rm -f *.o test_urcu test_urcu_timing test_rwlock_timing urcu-asm.S \
af02d47e 86 test_urcu_yield urcutorture urcutorture-yield liburcu.so \
0114ba7f 87 test_urcu_dynamic_link api.h arch.h arch_atomic.h
This page took 0.026252 seconds and 4 git commands to generate.