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 \
14 @echo "Architecture ${HOSTTYPE} is currently unsupported by liburcu"
18 arch.h: arch_${ARCHTYPE}.h
19 cp -f arch_${ARCHTYPE}.h arch.h
21 arch_atomic.h: arch_atomic_${ARCHTYPE}.h
22 cp -f arch_atomic_${ARCHTYPE}.h arch_atomic.h
24 urcu.h: arch.h arch_atomic.h
26 urcu-qsbr.h: arch.h arch_atomic.h
29 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
31 urcu-mb.o: urcu.c urcu.h
32 $(CC) -fPIC -DURCU_MB ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
34 urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
35 $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
38 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
40 liburcu-qsbr.so: urcu-qsbr.o
41 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
43 liburcu-mb.so: urcu-mb.o
44 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
46 urcu-yield.o: urcu.c urcu.h
47 $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
49 .PHONY: clean install checkarch tests
52 -for d in ${DIRS}; do cd $${d}; ${MAKE} ${MFLAGS} ${EXTRAMFLAGS}; done
55 cp -f liburcu.so liburcu-mb.so liburcu-qsbr.so /usr/lib/
56 cp -f arch.h arch_atomic.h compiler.h \
57 urcu.h urcu-static.h \
58 urcu-qsbr.h urcu-qsbr-static.h \
62 rm -f *.o *.so arch.h arch_atomic.h
63 -for d in ${DIRS}; do cd $${d}; ${MAKE} clean; done