cp -f arch.h arch_atomic.h compiler.h urcu.h urcu-static.h /usr/include/
clean:
- rm -f *.o test_urcu test_urcu_timing test_rwlock_timing urcu-asm.S \
- test_urcu_yield urcutorture urcutorture-yield liburcu.so \
- test_urcu_dynamic_link api.h arch.h arch_atomic.h
+ rm -f *.o test_urcu test_urcu_dynamic_link test_urcu_timing \
+ test_rwlock_timing test_rwlock test_perthreadlock_timing \
+ test_perthreadlock test_urcu_yield test_urcu_mb \
+ urcu-asm.S test_qsbr_timing test_qsbr urcutorture \
+ urcutorture-yield liburcu.so
+
LDFLAGS=-lpthread
#debug
-#CFLAGS=-Wall -g
+#CFLAGS=-m64 -Wall -g
#CFLAGS+=-DDEBUG_FULL_MB
#Changing the signal number used by the library. SIGUSR1 by default.
#CFLAGS+=-DSIGURCU=SIGUSR2
-SRC_DEP=`echo $^ | sed 's/[^ ]*.h//g'`
+SRC_DEP=`echo $^ | sed 's/[^ ]*\.h//g'`
all: arch-api test_urcu test_urcu_dynamic_link test_urcu_timing \
- test_rwlock_timing test_urcu_yield urcu-asm.S \
- urcu-asm.o urcutorture urcutorture-yield liburcu.so
+ test_rwlock_timing test_rwlock test_perthreadlock_timing \
+ test_perthreadlock test_urcu_yield test_urcu_mb \
+ urcu-asm.S test_qsbr_timing test_qsbr urcu-asm.o urcutorture \
+ urcutorture-yield liburcu.so
arch-api: api.h arch.h
# Run either make pthreads-x86 or make pthreads-ppc prior to build
test_urcu: urcu.o test_urcu.c urcu.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+test_urcu_mb: urcu-mb.o test_urcu.c urcu.h
+ $(CC) -DDEBUG_FULL_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
+test_qsbr: urcu-qsbr.o test_qsbr.c urcu-qsbr.h
+ $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
+test_rwlock: urcu.o test_rwlock.c urcu.h
+ $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
+test_perthreadlock: urcu.o test_perthreadlock.c urcu.h
+ $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
test_urcu_dynamic_link: urcu.o test_urcu.c urcu.h
$(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP)
test_urcu_timing: urcu.o test_urcu_timing.c urcu.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+test_qsbr_timing: urcu-qsbr.o test_qsbr_timing.c urcu-qsbr.h
+ $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
test_rwlock_timing: urcu.o test_rwlock_timing.c urcu.h
$(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+test_perthreadlock_timing: urcu.o test_perthreadlock_timing.c urcu.h
+ $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
urcu.o: urcu.c urcu.h
$(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
+urcu-mb.o: urcu.c urcu.h
+ $(CC) -fPIC -DDEBUG_FULL_MB ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
+
+urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h
+ $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
+
liburcu.so: urcu.o
$(CC) -m64 -fPIC -shared -o $@ $<
.PHONY: clean install arch-api
install: liburcu.so
- cp -f liburcu.so /usr/lib64/
+ cp -f liburcu.so /usr/lib/
cp -f arch.h arch_atomic.h compiler.h urcu.h urcu-static.h /usr/include/
clean:
- rm -f *.o test_urcu test_urcu_timing test_rwlock_timing urcu-asm.S \
- test_urcu_yield urcutorture urcutorture-yield liburcu.so \
- test_urcu_dynamic_link api.h arch.h arch_atomic.h
+ rm -f *.o test_urcu test_urcu_dynamic_link test_urcu_timing \
+ test_rwlock_timing test_rwlock test_perthreadlock_timing \
+ test_perthreadlock test_urcu_yield test_urcu_mb \
+ urcu-asm.S test_qsbr_timing test_qsbr urcutorture \
+ urcutorture-yield liburcu.so
+