Fix tests makefile
[urcu.git] / Makefile.inc
CommitLineData
833dbdb6
MD
1
2include Makefile.build.inc
3
4DIRS=tests
5
7ac06cef
MD
6all: checkarch liburcu.so urcu.o \
7 liburcu-qsbr.so urcu-qsbr.o \
8 liburcu-mb.so urcu-mb.o \
fdee2e6d 9 liburcu-bp.so urcu-bp.o \
786ee85b 10 liburcu-defer.so urcu-defer.o \
7ac06cef
MD
11 urcu-yield.o \
12 subdirs
833dbdb6
MD
13
14checkarch:
15ifeq (${ARCHTYPE},)
16 @echo "Architecture ${HOSTTYPE} is currently unsupported by liburcu"
17 @exit 1
18endif
19
ec4e58a3
MD
20urcu/arch.h: urcu/arch_${ARCHTYPE}.h
21 cp -f urcu/arch_${ARCHTYPE}.h urcu/arch.h
833dbdb6 22
ec4e58a3
MD
23urcu/arch_uatomic.h: urcu/arch_uatomic_${ARCHTYPE}.h
24 cp -f urcu/arch_uatomic_${ARCHTYPE}.h urcu/arch_uatomic.h
833dbdb6 25
ec4e58a3 26urcu.h: urcu/arch.h urcu/arch_uatomic.h
833dbdb6 27
ec4e58a3 28urcu-qsbr.h: urcu/arch.h urcu/arch_uatomic.h
833dbdb6 29
7e30abe3
MD
30urcu-pointer.o: urcu-pointer.c urcu-pointer.h urcu-pointer-static.h
31 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
32
833dbdb6 33urcu.o: urcu.c urcu.h
17999ad8 34 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
833dbdb6
MD
35
36urcu-mb.o: urcu.c urcu.h
17999ad8 37 $(CC) -fPIC -DURCU_MB ${CFLAGS} -c -o $@ $(SRC_DEP)
833dbdb6 38
fdee2e6d
MD
39urcu-bp.o: urcu-bp.c urcu-bp.h
40 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
41
833dbdb6 42urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
17999ad8 43 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
833dbdb6 44
786ee85b 45urcu-defer.o: urcu-defer.c urcu-defer.h
17999ad8 46 $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP)
90075a50 47
7e30abe3 48liburcu.so: urcu.o urcu-pointer.o
a669219f 49 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
833dbdb6 50
7e30abe3 51liburcu-qsbr.so: urcu-qsbr.o urcu-pointer.o
a669219f 52 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
7ac06cef 53
7e30abe3 54liburcu-mb.so: urcu-mb.o urcu-pointer.o
a669219f 55 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
7ac06cef 56
fdee2e6d
MD
57liburcu-bp.so: urcu-bp.o urcu-pointer.o
58 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
59
786ee85b 60liburcu-defer.so: urcu-defer.o
90075a50
MD
61 $(CC) ${LDFLAGS} -fPIC -shared -o $@ $<
62
833dbdb6 63urcu-yield.o: urcu.c urcu.h
17999ad8 64 $(CC) -DDEBUG_YIELD ${CFLAGS} -c -o $@ $(SRC_DEP)
833dbdb6
MD
65
66.PHONY: clean install checkarch tests
67
68subdirs:
a669219f 69 -for d in ${DIRS}; do cd $${d}; ${MAKE} ${MFLAGS} ${EXTRAMFLAGS}; done
833dbdb6
MD
70
71install: liburcu.so
2f873279 72 cp -f liburcu.so liburcu-mb.so liburcu-qsbr.so liburcu-defer.so \
fdee2e6d 73 liburcu-bp.so \
2f873279 74 /usr/lib/
ec4e58a3
MD
75 mkdir -p /usr/include/urcu
76 cp -f urcu/arch.h urcu/arch_uatomic.h urcu/compiler.h \
f83e795f 77 urcu/system.h urcu/list.h urcu/rculist.h urcu/hlist.h \
ec4e58a3
MD
78 /usr/include/urcu/
79 cp -f urcu.h urcu-static.h \
2f873279 80 urcu-qsbr.h urcu-qsbr-static.h \
fdee2e6d 81 urcu-bp.h urcu-bp-static.h \
2f873279 82 urcu-defer.h urcu-defer-static.h \
7e30abe3 83 urcu-pointer.h urcu-pointer-static.h \
7ac06cef 84 /usr/include/
833dbdb6
MD
85
86clean:
ec4e58a3 87 rm -f *.o *.so urcu/arch.h urcu/arch_uatomic.h
833dbdb6 88 -for d in ${DIRS}; do cd $${d}; ${MAKE} clean; done
This page took 0.044376 seconds and 4 git commands to generate.