Add scalability qsbr test
[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 \
061159a0
MD
15 test_rwlock_timing test_perthreadlock_timing test_urcu_yield \
16 urcu-asm.S test_qsbr_timing test_qsbr urcu-asm.o urcutorture \
17 urcutorture-yield liburcu.so
20bf310a 18
d2d23035
MD
19arch-api: api.h arch.h
20 # Run either make pthreads-x86 or make pthreads-ppc prior to build
21 # the RCU library. Architecture auto-detectection not implemented
22 # in the build system yet.
23
2d6debff
PM
24pthreads-x86: clean
25 cp api_x86.h api.h
26 cp arch_x86.h arch.h
0114ba7f 27 cp arch_atomic_x86.h arch_atomic.h
2d6debff
PM
28
29pthreads-ppc: clean
30 cp api_ppc.h api.h
31 cp arch_ppc.h arch.h
0114ba7f 32 cp arch_atomic_ppc.h arch_atomic.h
2d6debff 33
1430ee0b 34test_urcu: urcu.o test_urcu.c urcu.h
20bf310a
MD
35 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
36
061159a0
MD
37test_qsbr: urcu-qsbr.o test_qsbr.c urcu-qsbr.h
38 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
39
121a5d44
MD
40test_urcu_dynamic_link: urcu.o test_urcu.c urcu.h
41 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
42
1430ee0b 43test_urcu_yield: urcu-yield.o test_urcu.c urcu.h
cf380c2f
MD
44 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
45
1430ee0b 46test_urcu_timing: urcu.o test_urcu_timing.c urcu.h
20bf310a
MD
47 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
48
420e5b92
MD
49test_qsbr_timing: urcu-qsbr.o test_qsbr_timing.c urcu-qsbr.h
50 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
51
1430ee0b 52test_rwlock_timing: urcu.o test_rwlock_timing.c urcu.h
20bf310a 53 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
27b012e2 54
102d1d23
MD
55test_perthreadlock_timing: urcu.o test_perthreadlock_timing.c urcu.h
56 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
57
27b012e2 58urcu.o: urcu.c urcu.h
121a5d44
MD
59 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
60
420e5b92
MD
61urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
62 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
63
121a5d44
MD
64liburcu.so: urcu.o
65 $(CC) -fPIC -shared -o $@ $<
c777f0b1 66
cf380c2f
MD
67urcu-yield.o: urcu.c urcu.h
68 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
69
1430ee0b
MD
70urcu-asm.S: urcu-asm.c urcu.h
71 $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP)
72
73urcu-asm.o: urcu-asm.c urcu.h
74 $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
75
e7b43771 76urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h
e462817e
MD
77 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
78
9b171f46
MD
79urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h
80 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
81
d2d23035 82.PHONY: clean install arch-api
121a5d44
MD
83
84install: liburcu.so
85 cp -f liburcu.so /usr/lib/
0114ba7f 86 cp -f arch.h arch_atomic.h compiler.h urcu.h urcu-static.h /usr/include/
c777f0b1
MD
87
88clean:
1430ee0b 89 rm -f *.o test_urcu test_urcu_timing test_rwlock_timing urcu-asm.S \
af02d47e 90 test_urcu_yield urcutorture urcutorture-yield liburcu.so \
0114ba7f 91 test_urcu_dynamic_link api.h arch.h arch_atomic.h
This page took 0.037713 seconds and 4 git commands to generate.