update test timings for writer
[urcu.git] / Makefile64
CommitLineData
bcf80111
SM
1
2#CFLAGS=-m64 -Wall -O2 -g -I.
3CFLAGS=-m64 -O2 -g -I.
4LDFLAGS=-lpthread
5
6#debug
7#CFLAGS=-Wall -g
8#CFLAGS+=-DDEBUG_FULL_MB
9
10#Changing the signal number used by the library. SIGUSR1 by default.
11#CFLAGS+=-DSIGURCU=SIGUSR2
12
13SRC_DEP=`echo $^ | sed 's/[^ ]*.h//g'`
14
15all: arch-api test_urcu test_urcu_dynamic_link test_urcu_timing \
16 test_rwlock_timing test_urcu_yield urcu-asm.S \
17 urcu-asm.o urcutorture urcutorture-yield liburcu.so
18
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
24pthreads-x86: clean
25 cp api_x86.h api.h
26 cp arch_x86.h arch.h
27 cp arch_atomic_x86.h arch_atomic.h
28
29pthreads-ppc: clean
30 cp api_ppc.h api.h
31 cp arch_ppc.h arch.h
32 cp arch_atomic_ppc.h arch_atomic.h
33
34test_urcu: urcu.o test_urcu.c urcu.h
35 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
36
37test_urcu_dynamic_link: urcu.o test_urcu.c urcu.h
38 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
39
40test_urcu_yield: urcu-yield.o test_urcu.c urcu.h
41 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
42
43test_urcu_timing: urcu.o test_urcu_timing.c urcu.h
44 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
45
46test_rwlock_timing: urcu.o test_rwlock_timing.c urcu.h
47 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
48
49urcu.o: urcu.c urcu.h
50 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
51
52liburcu.so: urcu.o
53 $(CC) -m64 -fPIC -shared -o $@ $<
54
55urcu-yield.o: urcu.c urcu.h
56 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
57
58urcu-asm.S: urcu-asm.c urcu.h
59 $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP)
60
61urcu-asm.o: urcu-asm.c urcu.h
62 $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
63
64urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h
65 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
66
67urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h
68 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
69
70.PHONY: clean install arch-api
71
72install: liburcu.so
73 cp -f liburcu.so /usr/lib64/
74 cp -f arch.h arch_atomic.h compiler.h urcu.h urcu-static.h /usr/include/
75
76clean:
77 rm -f *.o test_urcu test_urcu_timing test_rwlock_timing urcu-asm.S \
78 test_urcu_yield urcutorture urcutorture-yield liburcu.so \
79 test_urcu_dynamic_link api.h arch.h arch_atomic.h
This page took 0.025607 seconds and 4 git commands to generate.