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