Commit | Line | Data |
---|---|---|
27b012e2 | 1 | |
bb488185 MD |
2 | CFLAGS=-Wall -O2 -g |
3 | LDFLAGS=-lpthread | |
4 | ||
20bf310a MD |
5 | #debug |
6 | #CFLAGS=-Wall -g | |
bb488185 | 7 | #CFLAGS+=-DDEBUG_FULL_MB |
20bf310a MD |
8 | |
9 | SRC_DEP=`echo $^ | sed 's/[^ ]*.h//g'` | |
10 | ||
1430ee0b | 11 | all: test_urcu test_urcu_timing test_rwlock_timing test_urcu_yield urcu-asm.S \ |
9b171f46 | 12 | urcu-asm.o urcutorture urcutorture-yield |
20bf310a | 13 | |
2d6debff PM |
14 | pthreads-x86: clean |
15 | cp api_x86.h api.h | |
16 | cp arch_x86.h arch.h | |
17 | ||
18 | pthreads-ppc: clean | |
19 | cp api_ppc.h api.h | |
20 | cp arch_ppc.h arch.h | |
21 | ||
1430ee0b | 22 | test_urcu: urcu.o test_urcu.c urcu.h |
20bf310a MD |
23 | $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) |
24 | ||
1430ee0b | 25 | test_urcu_yield: urcu-yield.o test_urcu.c urcu.h |
cf380c2f MD |
26 | $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) |
27 | ||
1430ee0b | 28 | test_urcu_timing: urcu.o test_urcu_timing.c urcu.h |
20bf310a MD |
29 | $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) |
30 | ||
1430ee0b | 31 | test_rwlock_timing: urcu.o test_rwlock_timing.c urcu.h |
20bf310a | 32 | $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) |
27b012e2 MD |
33 | |
34 | urcu.o: urcu.c urcu.h | |
20bf310a | 35 | $(CC) ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP) |
c777f0b1 | 36 | |
cf380c2f MD |
37 | urcu-yield.o: urcu.c urcu.h |
38 | $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP) | |
39 | ||
1430ee0b MD |
40 | urcu-asm.S: urcu-asm.c urcu.h |
41 | $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP) | |
42 | ||
43 | urcu-asm.o: urcu-asm.c urcu.h | |
44 | $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP) | |
45 | ||
e7b43771 | 46 | urcutorture: urcutorture.c urcu.o urcu.h rcutorture.h |
e462817e MD |
47 | $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) |
48 | ||
9b171f46 MD |
49 | urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h |
50 | $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) | |
51 | ||
c777f0b1 MD |
52 | .PHONY: clean |
53 | ||
54 | clean: | |
1430ee0b | 55 | rm -f *.o test_urcu test_urcu_timing test_rwlock_timing urcu-asm.S \ |
83aa4dc8 | 56 | test_urcu_yield urcutorture urcutorture-yield |