From: Mathieu Desnoyers Date: Wed, 10 Jun 2009 15:53:59 +0000 (-0400) Subject: Update makefiles X-Git-Tag: v0.1~177 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b82229e490f08be13bc5c9916ec4793410467f7b;p=urcu.git Update makefiles Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile b/Makefile index 1455680..5b8e655 100644 --- a/Makefile +++ b/Makefile @@ -99,6 +99,9 @@ install: liburcu.so 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 + diff --git a/Makefile64 b/Makefile64 index 7c343a3..83b0fd6 100644 --- a/Makefile64 +++ b/Makefile64 @@ -4,17 +4,19 @@ CFLAGS=-m64 -O2 -g -I. 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 @@ -34,6 +36,18 @@ pthreads-ppc: clean 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) @@ -43,12 +57,24 @@ test_urcu_yield: urcu-yield.o test_urcu.c urcu.h 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 $@ $< @@ -70,10 +96,13 @@ urcutorture-yield: urcutorture.c urcu-yield.o urcu.h rcutorture.h .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 +