a27f0c31357f2449bfe015963963a46cc35d85c7
[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-bp.so urcu-bp.o \
10 liburcu-defer.so urcu-defer.o \
11 urcu-yield.o \
12 subdirs
13
14 checkarch:
15 ifeq (${ARCHTYPE},)
16 @echo "Architecture ${HOSTTYPE} is currently unsupported by liburcu"
17 @exit 1
18 endif
19
20 urcu/arch.h: urcu/arch_${ARCHTYPE}.h
21 cp -f urcu/arch_${ARCHTYPE}.h urcu/arch.h
22
23 urcu/arch_uatomic.h: urcu/arch_uatomic_${ARCHTYPE}.h
24 cp -f urcu/arch_uatomic_${ARCHTYPE}.h urcu/arch_uatomic.h
25
26 urcu.h: urcu/arch.h urcu/arch_uatomic.h
27
28 urcu-qsbr.h: urcu/arch.h urcu/arch_uatomic.h
29
30 urcu-pointer.o: urcu-pointer.c urcu-pointer.h urcu-pointer-static.h
31 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
32
33 urcu.o: urcu.c urcu.h
34 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
35
36 urcu-mb.o: urcu.c urcu.h
37 $(CC) -fPIC -DURCU_MB ${CFLAGS} -c -o $@ $(SRC_DEP)
38
39 urcu-bp.o: urcu-bp.c urcu-bp.h
40 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
41
42 urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
43 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
44
45 urcu-defer.o: urcu-defer.c urcu-defer.h
46 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
47
48 liburcu.so: urcu.o urcu-pointer.o
49 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
50
51 liburcu-qsbr.so: urcu-qsbr.o urcu-pointer.o
52 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
53
54 liburcu-mb.so: urcu-mb.o urcu-pointer.o
55 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
56
57 liburcu-bp.so: urcu-bp.o urcu-pointer.o
58 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
59
60 liburcu-defer.so: urcu-defer.o
61 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
62
63 urcu-yield.o: urcu.c urcu.h
64 $(CC) -DDEBUG_YIELD ${CFLAGS} -c -o $@ $(SRC_DEP)
65
66 .PHONY: clean install checkarch tests
67
68 subdirs:
69 -for d in ${DIRS}; do cd $${d}; ${MAKE} ${MFLAGS} ${EXTRAMFLAGS}; done
70
71 install: liburcu.so
72 cp -f liburcu.so liburcu-mb.so liburcu-qsbr.so liburcu-defer.so \
73 liburcu-bp.so \
74 /usr/lib/
75 mkdir -p /usr/include/urcu
76 cp -f urcu/arch.h urcu/arch_uatomic.h urcu/compiler.h \
77 urcu/system.h urcu/list.h urcu/rculist.h urcu/hlist.h \
78 /usr/include/urcu/
79 cp -f urcu.h urcu-static.h \
80 urcu-qsbr.h urcu-qsbr-static.h \
81 urcu-bp.h urcu-bp-static.h \
82 urcu-defer.h urcu-defer-static.h \
83 urcu-pointer.h urcu-pointer-static.h \
84 /usr/include/
85
86 clean:
87 rm -f *.o *.so urcu/arch.h urcu/arch_uatomic.h
88 -for d in ${DIRS}; do cd $${d}; ${MAKE} clean; done
This page took 0.041439 seconds and 3 git commands to generate.