Commit | Line | Data |
---|---|---|
27b012e2 | 1 | |
20bf310a MD |
2 | CFLAGS=-Wall -O2 |
3 | #debug | |
4 | #CFLAGS=-Wall -g | |
5 | LDFLAGS=-lpthread | |
6 | ||
7 | SRC_DEP=`echo $^ | sed 's/[^ ]*.h//g'` | |
8 | ||
1430ee0b MD |
9 | all: test_urcu test_urcu_timing test_rwlock_timing test_urcu_yield urcu-asm.S \ |
10 | urcu-asm.o | |
20bf310a | 11 | |
1430ee0b | 12 | test_urcu: urcu.o test_urcu.c urcu.h |
20bf310a MD |
13 | $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) |
14 | ||
1430ee0b | 15 | test_urcu_yield: urcu-yield.o test_urcu.c urcu.h |
cf380c2f MD |
16 | $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) |
17 | ||
1430ee0b | 18 | test_urcu_timing: urcu.o test_urcu_timing.c urcu.h |
20bf310a MD |
19 | $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) |
20 | ||
1430ee0b | 21 | test_rwlock_timing: urcu.o test_rwlock_timing.c urcu.h |
20bf310a | 22 | $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) |
27b012e2 MD |
23 | |
24 | urcu.o: urcu.c urcu.h | |
20bf310a | 25 | $(CC) ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP) |
c777f0b1 | 26 | |
cf380c2f MD |
27 | urcu-yield.o: urcu.c urcu.h |
28 | $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP) | |
29 | ||
1430ee0b MD |
30 | urcu-asm.S: urcu-asm.c urcu.h |
31 | $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP) | |
32 | ||
33 | urcu-asm.o: urcu-asm.c urcu.h | |
34 | $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP) | |
35 | ||
e462817e MD |
36 | #in progress... |
37 | urcutorture.o: urcutorture.c urcu.o urcu.h rcutorture.h | |
38 | $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) | |
39 | ||
c777f0b1 MD |
40 | .PHONY: clean |
41 | ||
42 | clean: | |
1430ee0b MD |
43 | rm -f *.o test_urcu test_urcu_timing test_rwlock_timing urcu-asm.S \ |
44 | test_urcu_yield |