2 include Makefile.build.inc
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 \
16 @echo "Architecture ${HOSTTYPE} is currently unsupported by liburcu"
20 urcu/arch.h: urcu/arch_${ARCHTYPE}.h
21 cp -f urcu/arch_${ARCHTYPE}.h urcu/arch.h
23 urcu/arch_uatomic.h: urcu/arch_uatomic_${ARCHTYPE}.h
24 cp -f urcu/arch_uatomic_${ARCHTYPE}.h urcu/arch_uatomic.h
26 urcu.h: urcu/arch.h urcu/arch_uatomic.h
28 urcu-qsbr.h: urcu/arch.h urcu/arch_uatomic.h
30 urcu-pointer.o: urcu-pointer.c urcu-pointer.h urcu-pointer-static.h
31 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
34 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
36 urcu-mb.o: urcu.c urcu.h
37 $(CC) -fPIC -DURCU_MB ${CFLAGS} -c -o $@ $(SRC_DEP)
39 urcu-bp.o: urcu-bp.c urcu-bp.h
40 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
42 urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
43 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
45 urcu-defer.o: urcu-defer.c urcu-defer.h
46 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
48 liburcu.so: urcu.o urcu-pointer.o
49 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
51 liburcu-qsbr.so: urcu-qsbr.o urcu-pointer.o
52 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
54 liburcu-mb.so: urcu-mb.o urcu-pointer.o
55 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
57 liburcu-bp.so: urcu-bp.o urcu-pointer.o
58 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
60 liburcu-defer.so: urcu-defer.o
61 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
63 urcu-yield.o: urcu.c urcu.h
64 $(CC) -DDEBUG_YIELD ${CFLAGS} -c -o $@ $(SRC_DEP)
66 .PHONY: clean install checkarch tests
69 -for d in ${DIRS}; do cd $${d}; ${MAKE} ${MFLAGS} ${EXTRAMFLAGS}; done
72 cp -f liburcu.so liburcu-mb.so liburcu-qsbr.so liburcu-defer.so \
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 \
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 \
87 rm -f *.o *.so urcu/arch.h urcu/arch_uatomic.h
88 -for d in ${DIRS}; do cd $${d}; ${MAKE} clean; done