Align the summary result
[userspace-rcu.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
14
bcf80111 15#debug
b82229e4 16#CFLAGS=-m64 -Wall -g
bcf80111
SM
17#CFLAGS+=-DDEBUG_FULL_MB
18
19#Changing the signal number used by the library. SIGUSR1 by default.
20#CFLAGS+=-DSIGURCU=SIGUSR2
21
b82229e4 22SRC_DEP=`echo $^ | sed 's/[^ ]*\.h//g'`
bcf80111 23
60fe0c90 24all: checkarch test_urcu test_urcu_dynamic_link test_urcu_timing \
b82229e4
MD
25 test_rwlock_timing test_rwlock test_perthreadlock_timing \
26 test_perthreadlock test_urcu_yield test_urcu_mb \
27 urcu-asm.S test_qsbr_timing test_qsbr urcu-asm.o urcutorture \
51299083 28 urcutorture-yield liburcu.so test_mutex
bcf80111 29
60fe0c90
MD
30checkarch:
31ifeq (${ARCHTYPE},)
32 @echo "Architecture ${HOSTTYPE} is currently unsupported by liburcu"
33 @exit 1
34endif
35
36arch.h: arch_${ARCHTYPE}.h
37 cp -f arch_${ARCHTYPE}.h arch.h
38
39api.h: api_${ARCHTYPE}.h
40 cp -f api_${ARCHTYPE}.h api.h
bcf80111 41
60fe0c90
MD
42arch_atomic.h: arch_atomic_${ARCHTYPE}.h
43 cp -f arch_atomic_${ARCHTYPE}.h arch_atomic.h
bcf80111 44
60fe0c90
MD
45urcu.h: arch.h api.h arch_atomic.h
46
47urcu-qsbr.h: arch.h api.h arch_atomic.h
bcf80111
SM
48
49test_urcu: urcu.o test_urcu.c urcu.h
50 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
51
b82229e4
MD
52test_urcu_mb: urcu-mb.o test_urcu.c urcu.h
53 $(CC) -DDEBUG_FULL_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
54
55test_qsbr: urcu-qsbr.o test_qsbr.c urcu-qsbr.h
56 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
57
58test_rwlock: urcu.o test_rwlock.c urcu.h
59 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
60
61test_perthreadlock: urcu.o test_perthreadlock.c urcu.h
62 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
63
51299083
MD
64test_mutex: urcu.o test_mutex.c urcu.h
65 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
66
bcf80111
SM
67test_urcu_dynamic_link: urcu.o test_urcu.c urcu.h
68 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
69
70test_urcu_yield: urcu-yield.o test_urcu.c urcu.h
71 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
72
73test_urcu_timing: urcu.o test_urcu_timing.c urcu.h
74 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
75
b82229e4
MD
76test_qsbr_timing: urcu-qsbr.o test_qsbr_timing.c urcu-qsbr.h
77 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
78
bcf80111
SM
79test_rwlock_timing: urcu.o test_rwlock_timing.c urcu.h
80 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
81
b82229e4
MD
82test_perthreadlock_timing: urcu.o test_perthreadlock_timing.c urcu.h
83 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
84
bcf80111
SM
85urcu.o: urcu.c urcu.h
86 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
87
b82229e4
MD
88urcu-mb.o: urcu.c urcu.h
89 $(CC) -fPIC -DDEBUG_FULL_MB ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
90
91urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
92 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
93
bcf80111
SM
94liburcu.so: urcu.o
95 $(CC) -m64 -fPIC -shared -o $@ $<
96
97urcu-yield.o: urcu.c urcu.h
98 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
99
100urcu-asm.S: urcu-asm.c urcu.h
101 $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP)
102
103urcu-asm.o: urcu-asm.c urcu.h
104 $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
105
106urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h
107 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
108
109urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h
110 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
111
60fe0c90 112.PHONY: clean install checkarch
bcf80111
SM
113
114install: liburcu.so
b82229e4 115 cp -f liburcu.so /usr/lib/
bcf80111
SM
116 cp -f arch.h arch_atomic.h compiler.h urcu.h urcu-static.h /usr/include/
117
118clean:
b82229e4
MD
119 rm -f *.o test_urcu test_urcu_dynamic_link test_urcu_timing \
120 test_rwlock_timing test_rwlock test_perthreadlock_timing \
121 test_perthreadlock test_urcu_yield test_urcu_mb \
122 urcu-asm.S test_qsbr_timing test_qsbr urcutorture \
51299083
MD
123 urcutorture-yield liburcu.so api.h arch.h arch_atomic.h \
124 test_mutex
b82229e4 125
This page took 0.029548 seconds and 4 git commands to generate.