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