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