Add final license to test file, cleanup makefile
[urcu.git] / Makefile
CommitLineData
27b012e2 1
121a5d44 2CFLAGS=-Wall -O2 -g -I.
bb488185
MD
3LDFLAGS=-lpthread
4
20bf310a
MD
5#debug
6#CFLAGS=-Wall -g
bb488185 7#CFLAGS+=-DDEBUG_FULL_MB
20bf310a 8
121a5d44
MD
9#Changing the signal number used by the library. SIGUSR1 by default.
10#CFLAGS+=-DSIGURCU=SIGUSR2
11
20bf310a
MD
12SRC_DEP=`echo $^ | sed 's/[^ ]*.h//g'`
13
121a5d44
MD
14all: test_urcu test_urcu_dynamic_link test_urcu_timing \
15 test_rwlock_timing test_urcu_yield urcu-asm.S \
16 urcu-asm.o urcutorture urcutorture-yield liburcu.so
20bf310a 17
2d6debff
PM
18pthreads-x86: clean
19 cp api_x86.h api.h
20 cp arch_x86.h arch.h
21
22pthreads-ppc: clean
23 cp api_ppc.h api.h
24 cp arch_ppc.h arch.h
25
1430ee0b 26test_urcu: urcu.o test_urcu.c urcu.h
20bf310a
MD
27 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
28
121a5d44
MD
29test_urcu_dynamic_link: urcu.o test_urcu.c urcu.h
30 $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
31
1430ee0b 32test_urcu_yield: urcu-yield.o test_urcu.c urcu.h
cf380c2f
MD
33 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
34
1430ee0b 35test_urcu_timing: urcu.o test_urcu_timing.c urcu.h
20bf310a
MD
36 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
37
1430ee0b 38test_rwlock_timing: urcu.o test_rwlock_timing.c urcu.h
20bf310a 39 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
27b012e2
MD
40
41urcu.o: urcu.c urcu.h
121a5d44
MD
42 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
43
44liburcu.so: urcu.o
45 $(CC) -fPIC -shared -o $@ $<
c777f0b1 46
cf380c2f
MD
47urcu-yield.o: urcu.c urcu.h
48 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
49
1430ee0b
MD
50urcu-asm.S: urcu-asm.c urcu.h
51 $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP)
52
53urcu-asm.o: urcu-asm.c urcu.h
54 $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP)
55
e7b43771 56urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h
e462817e
MD
57 $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
58
9b171f46
MD
59urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h
60 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
61
121a5d44
MD
62.PHONY: clean install
63
64install: liburcu.so
65 cp -f liburcu.so /usr/lib/
66 cp -f arch.h compiler.h urcu.h urcu-static.h /usr/include/
c777f0b1
MD
67
68clean:
1430ee0b 69 rm -f *.o test_urcu test_urcu_timing test_rwlock_timing urcu-asm.S \
af02d47e 70 test_urcu_yield urcutorture urcutorture-yield liburcu.so \
5e13fab8 71 test_urcu_dynamic_link api.h arch.h
This page took 0.035498 seconds and 4 git commands to generate.