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