Move DEBUG_FULL_MB to properly named CONFIG_URCU_AVOID_SIGNALS
[userspace-rcu.git] / Makefile64
1
2 #CFLAGS=-m64 -Wall -O2 -g -I.
3 CFLAGS=-m64 -O2 -g -I.
4 LDFLAGS=-lpthread
5
6 HOSTTYPE=$(shell uname -m)
7
8 ifeq ("${HOSTTYPE}","x86_64")
9 ARCHTYPE=x86
10 endif
11 ifeq ("${HOSTTYPE}","powerpc")
12 ARCHTYPE=ppc
13 endif
14 ifeq ("${HOSTTYPE}","ppc64")
15 ARCHTYPE=ppc
16 endif
17
18 #debug
19 #CFLAGS=-m64 -Wall -g
20
21 #Build the library without using signals. Slower read-side.
22 #CFLAGS+=-DCONFIG_URCU_AVOID_SIGNALS
23
24 #Changing the signal number used by the library. SIGUSR1 by default.
25 #CFLAGS+=-DSIGURCU=SIGUSR2
26
27 SRC_DEP=`echo $^ | sed 's/[^ ]*\.h//g'`
28
29 all: checkarch test_urcu test_urcu_dynamic_link test_urcu_timing \
30 test_rwlock_timing test_rwlock test_perthreadlock_timing \
31 test_perthreadlock test_urcu_yield test_urcu_mb \
32 urcu-asm.S test_qsbr_timing test_qsbr urcu-asm.o urcutorture \
33 urcutorture-yield liburcu.so test_mutex test_looplen test_urcu_gc \
34 test_urcu_gc_mb test_qsbr_gc test_qsbr_lgc test_urcu_lgc \
35 test_urcu_lgc_mb
36
37 checkarch:
38 ifeq (${ARCHTYPE},)
39 @echo "Architecture ${HOSTTYPE} is currently unsupported by liburcu"
40 @exit 1
41 endif
42
43 arch.h: arch_${ARCHTYPE}.h
44 cp -f arch_${ARCHTYPE}.h arch.h
45
46 api.h: api_${ARCHTYPE}.h
47 cp -f api_${ARCHTYPE}.h api.h
48
49 arch_atomic.h: arch_atomic_${ARCHTYPE}.h
50 cp -f arch_atomic_${ARCHTYPE}.h arch_atomic.h
51
52 urcu.h: arch.h api.h arch_atomic.h
53
54 urcu-qsbr.h: arch.h api.h arch_atomic.h
55
56 test_urcu: urcu.o test_urcu.c urcu.h
57 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
58
59 test_looplen: test_looplen.c urcu.h
60 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
61
62 test_urcu_mb: urcu-mb.o test_urcu.c urcu.h
63 $(CC) -DCONFIG_URCU_AVOID_SIGNALS ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
64
65 test_urcu_gc: urcu.o test_urcu_gc.c urcu.h
66 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
67
68 test_urcu_gc_mb: urcu-mb.o test_urcu_gc.c urcu.h
69 $(CC) -DCONFIG_URCU_AVOID_SIGNALS ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
70
71 test_urcu_lgc: urcu.o test_urcu_gc.c urcu.h
72 $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
73
74 test_urcu_lgc_mb: urcu-mb.o test_urcu_gc.c urcu.h
75 $(CC) -DTEST_LOCAL_GC -DCONFIG_URCU_AVOID_SIGNALS ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
76
77 test_qsbr: urcu-qsbr.o test_qsbr.c urcu-qsbr.h
78 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
79
80 test_qsbr_gc: urcu-qsbr.o test_qsbr_gc.c urcu-qsbr.h
81 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
82
83 test_qsbr_lgc: urcu-qsbr.o test_qsbr_gc.c urcu-qsbr.h
84 $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
85
86 test_rwlock: urcu.o test_rwlock.c urcu.h
87 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
88
89 test_perthreadlock: urcu.o test_perthreadlock.c urcu.h
90 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
91
92 test_mutex: urcu.o test_mutex.c urcu.h
93 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
94
95 test_urcu_dynamic_link: urcu.o test_urcu.c urcu.h
96 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
97
98 test_urcu_yield: urcu-yield.o test_urcu.c urcu.h
99 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
100
101 test_urcu_timing: urcu.o test_urcu_timing.c urcu.h
102 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
103
104 test_qsbr_timing: urcu-qsbr.o test_qsbr_timing.c urcu-qsbr.h
105 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
106
107 test_rwlock_timing: urcu.o test_rwlock_timing.c urcu.h
108 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
109
110 test_perthreadlock_timing: urcu.o test_perthreadlock_timing.c urcu.h
111 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
112
113 urcu.o: urcu.c urcu.h
114 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
115
116 urcu-mb.o: urcu.c urcu.h
117 $(CC) -fPIC -DCONFIG_URCU_AVOID_SIGNALS ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
118
119 urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
120 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
121
122 liburcu.so: urcu.o
123 $(CC) -m64 -fPIC -shared -o $@ $<
124
125 urcu-yield.o: urcu.c urcu.h
126 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
127
128 urcu-asm.S: urcu-asm.c urcu.h
129 $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP)
130
131 urcu-asm.o: urcu-asm.c urcu.h
132 $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
133
134 urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h
135 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
136
137 urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h
138 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
139
140 .PHONY: clean install checkarch
141
142 install: liburcu.so
143 cp -f liburcu.so /usr/lib/
144 cp -f arch.h arch_atomic.h compiler.h urcu.h urcu-static.h /usr/include/
145
146 clean:
147 rm -f *.o test_urcu test_urcu_dynamic_link test_urcu_timing \
148 test_rwlock_timing test_rwlock test_perthreadlock_timing \
149 test_perthreadlock test_urcu_yield test_urcu_mb \
150 urcu-asm.S test_qsbr_timing test_qsbr urcutorture \
151 urcutorture-yield liburcu.so api.h arch.h arch_atomic.h \
152 test_mutex test_urcu_gc test_urcu_gc_mb
153
This page took 0.031766 seconds and 4 git commands to generate.