Fix deadlock in qsbr code
[userspace-rcu.git] / Makefile64
CommitLineData
bcf80111
SM
1
2#CFLAGS=-m64 -Wall -O2 -g -I.
3CFLAGS=-m64 -O2 -g -I.
4LDFLAGS=-lpthread
5
6#debug
b82229e4 7#CFLAGS=-m64 -Wall -g
bcf80111
SM
8#CFLAGS+=-DDEBUG_FULL_MB
9
10#Changing the signal number used by the library. SIGUSR1 by default.
11#CFLAGS+=-DSIGURCU=SIGUSR2
12
b82229e4 13SRC_DEP=`echo $^ | sed 's/[^ ]*\.h//g'`
bcf80111
SM
14
15all: arch-api test_urcu test_urcu_dynamic_link test_urcu_timing \
b82229e4
MD
16 test_rwlock_timing test_rwlock test_perthreadlock_timing \
17 test_perthreadlock test_urcu_yield test_urcu_mb \
18 urcu-asm.S test_qsbr_timing test_qsbr urcu-asm.o urcutorture \
19 urcutorture-yield liburcu.so
bcf80111
SM
20
21arch-api: api.h arch.h
22 # Run either make pthreads-x86 or make pthreads-ppc prior to build
23 # the RCU library. Architecture auto-detectection not implemented
24 # in the build system yet.
25
26pthreads-x86: clean
27 cp api_x86.h api.h
28 cp arch_x86.h arch.h
29 cp arch_atomic_x86.h arch_atomic.h
30
31pthreads-ppc: clean
32 cp api_ppc.h api.h
33 cp arch_ppc.h arch.h
34 cp arch_atomic_ppc.h arch_atomic.h
35
36test_urcu: urcu.o test_urcu.c urcu.h
37 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
38
b82229e4
MD
39test_urcu_mb: urcu-mb.o test_urcu.c urcu.h
40 $(CC) -DDEBUG_FULL_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
41
42test_qsbr: urcu-qsbr.o test_qsbr.c urcu-qsbr.h
43 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
44
45test_rwlock: urcu.o test_rwlock.c urcu.h
46 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
47
48test_perthreadlock: urcu.o test_perthreadlock.c urcu.h
49 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
50
bcf80111
SM
51test_urcu_dynamic_link: urcu.o test_urcu.c urcu.h
52 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
53
54test_urcu_yield: urcu-yield.o test_urcu.c urcu.h
55 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
56
57test_urcu_timing: urcu.o test_urcu_timing.c urcu.h
58 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
59
b82229e4
MD
60test_qsbr_timing: urcu-qsbr.o test_qsbr_timing.c urcu-qsbr.h
61 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
62
bcf80111
SM
63test_rwlock_timing: urcu.o test_rwlock_timing.c urcu.h
64 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
65
b82229e4
MD
66test_perthreadlock_timing: urcu.o test_perthreadlock_timing.c urcu.h
67 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
68
bcf80111
SM
69urcu.o: urcu.c urcu.h
70 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
71
b82229e4
MD
72urcu-mb.o: urcu.c urcu.h
73 $(CC) -fPIC -DDEBUG_FULL_MB ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
74
75urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
76 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
77
bcf80111
SM
78liburcu.so: urcu.o
79 $(CC) -m64 -fPIC -shared -o $@ $<
80
81urcu-yield.o: urcu.c urcu.h
82 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
83
84urcu-asm.S: urcu-asm.c urcu.h
85 $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP)
86
87urcu-asm.o: urcu-asm.c urcu.h
88 $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
89
90urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h
91 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
92
93urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h
94 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
95
96.PHONY: clean install arch-api
97
98install: liburcu.so
b82229e4 99 cp -f liburcu.so /usr/lib/
bcf80111
SM
100 cp -f arch.h arch_atomic.h compiler.h urcu.h urcu-static.h /usr/include/
101
102clean:
b82229e4
MD
103 rm -f *.o test_urcu test_urcu_dynamic_link test_urcu_timing \
104 test_rwlock_timing test_rwlock test_perthreadlock_timing \
105 test_perthreadlock test_urcu_yield test_urcu_mb \
106 urcu-asm.S test_qsbr_timing test_qsbr urcutorture \
107 urcutorture-yield liburcu.so
108
This page took 0.026698 seconds and 4 git commands to generate.