Add rcu-reclaim.so library
[urcu.git] / Makefile.inc
1
2 include Makefile.build.inc
3
4 DIRS=tests
5
6 all: checkarch liburcu.so urcu.o \
7 liburcu-qsbr.so urcu-qsbr.o \
8 liburcu-mb.so urcu-mb.o \
9 liburcu-reclaim.so urcu-reclaim.o \
10 urcu-yield.o \
11 subdirs
12
13 checkarch:
14 ifeq (${ARCHTYPE},)
15 @echo "Architecture ${HOSTTYPE} is currently unsupported by liburcu"
16 @exit 1
17 endif
18
19 arch.h: arch_${ARCHTYPE}.h
20 cp -f arch_${ARCHTYPE}.h arch.h
21
22 arch_atomic.h: arch_atomic_${ARCHTYPE}.h
23 cp -f arch_atomic_${ARCHTYPE}.h arch_atomic.h
24
25 urcu.h: arch.h arch_atomic.h
26
27 urcu-qsbr.h: arch.h arch_atomic.h
28
29 urcu.o: urcu.c urcu.h
30 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
31
32 urcu-mb.o: urcu.c urcu.h
33 $(CC) -fPIC -DURCU_MB ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
34
35 urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
36 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
37
38 urcu-reclaim.o: urcu-reclaim.c urcu-reclaim.h
39 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
40
41 liburcu.so: urcu.o
42 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
43
44 liburcu-qsbr.so: urcu-qsbr.o
45 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
46
47 liburcu-mb.so: urcu-mb.o
48 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
49
50 liburcu-reclaim.so: urcu-reclaim.o
51 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
52
53 urcu-yield.o: urcu.c urcu.h
54 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
55
56 .PHONY: clean install checkarch tests
57
58 subdirs:
59 -for d in ${DIRS}; do cd $${d}; ${MAKE} ${MFLAGS} ${EXTRAMFLAGS}; done
60
61 install: liburcu.so
62 cp -f liburcu.so liburcu-mb.so liburcu-qsbr.so /usr/lib/
63 cp -f arch.h arch_atomic.h compiler.h \
64 urcu.h urcu-static.h \
65 urcu-qsbr.h urcu-qsbr-static.h \
66 /usr/include/
67
68 clean:
69 rm -f *.o *.so arch.h arch_atomic.h
70 -for d in ${DIRS}; do cd $${d}; ${MAKE} clean; done
This page took 0.055516 seconds and 4 git commands to generate.