From 48d848c7291ec22da6258ac03cd9c1dafec1fdfb Mon Sep 17 00:00:00 2001 From: Pierre-Marc Fournier Date: Wed, 7 Oct 2009 17:16:24 -0400 Subject: [PATCH] convert to autotools Remove the old build system. Rename arch_uatomic*.h to uatomic_arch.h, to avoid conflits with non-generated arch_*.h. Signed-off-by: Pierre-Marc Fournier Signed-off-by: Mathieu Desnoyers --- .gitignore | 28 +++- Makefile | 1 - Makefile.am | 38 +++++ Makefile.build.inc | 45 ------ Makefile.inc | 88 ----------- Makefile32 | 5 - Makefile64 | 5 - README | 4 +- bootstrap | 12 ++ configure.ac | 53 +++++++ tests/Makefile | 1 - tests/Makefile.am | 110 ++++++++++++++ tests/Makefile.inc | 141 ------------------ tests/Makefile32 | 5 - tests/Makefile64 | 5 - tests/test_uatomic.c | 2 +- tests/urcutorture.c | 2 +- urcu-bp-static.h | 2 +- urcu-defer-static.h | 2 +- urcu-pointer-static.h | 2 +- urcu-pointer.h | 2 +- urcu-qsbr-static.h | 2 +- urcu-static.h | 2 +- ...{arch_uatomic_ppc.h => uatomic_arch_ppc.h} | 0 ...rch_uatomic_s390.h => uatomic_arch_s390.h} | 0 ...{arch_uatomic_x86.h => uatomic_arch_x86.h} | 0 26 files changed, 250 insertions(+), 307 deletions(-) delete mode 100644 Makefile create mode 100644 Makefile.am delete mode 100644 Makefile.build.inc delete mode 100644 Makefile.inc delete mode 100644 Makefile32 delete mode 100644 Makefile64 create mode 100644 bootstrap create mode 100644 configure.ac delete mode 100644 tests/Makefile create mode 100644 tests/Makefile.am delete mode 100644 tests/Makefile.inc delete mode 100644 tests/Makefile32 delete mode 100644 tests/Makefile64 rename urcu/{arch_uatomic_ppc.h => uatomic_arch_ppc.h} (100%) rename urcu/{arch_uatomic_s390.h => uatomic_arch_s390.h} (100%) rename urcu/{arch_uatomic_x86.h => uatomic_arch_x86.h} (100%) diff --git a/.gitignore b/.gitignore index 8e9efea..529ba09 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ urcutorture-yield urcu-yield.o tests/api.h urcu/arch.h -urcu/arch_uatomic.h +urcu/uatomic_arch.h liburcu-defer.so liburcu-mb.so liburcu-qsbr.so @@ -36,3 +36,29 @@ tests/test_urcu_lgc tests/test_urcu_lgc_mb tests/test_urcu_mb tests/test_urcu_mb_defer +tests/test_urcu_assign +tests/test_urcu_assign_dynamic_link +tests/test_urcu_bp +tests/test_urcu_bp_dynamic_link +tests/*.log + +#automake +/config.h +.deps/ +.libs/ +Makefile.in +Makefile +*.m4 +*.la +*.bz2 +*.o +*.lo +*.loT +/config.log +/configure +/config/ +/libtool +/stamp-h1 +/config.h.in +/config.status +/autom4te.cache/ diff --git a/Makefile b/Makefile deleted file mode 100644 index ab19097..0000000 --- a/Makefile +++ /dev/null @@ -1 +0,0 @@ -include Makefile.inc diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..623c193 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,38 @@ +ACLOCAL_AMFLAGS = -I m4 +INCLUDES = -I$(top_builddir)/urcu + +AM_LDFLAGS=-lpthread + +SUBDIRS = tests + +include_HEADERS = urcu.h $(top_srcdir)/urcu-*.h +nobase_dist_include_HEADERS = urcu/compiler.h urcu/hlist.h urcu/list.h urcu/rculist.h urcu/system.h +nobase_nodist_include_HEADERS = urcu/arch.h urcu/uatomic_arch.h + +EXTRA_DIST = $(top_srcdir)/urcu/arch_*.h $(top_srcdir)/urcu/uatomic_arch_*.h gpl-2.0.txt lgpl-2.1.txt lgpl-relicensing.txt README LICENSE + +lib_LTLIBRARIES = liburcu.la liburcu-mb.la liburcu-defer.la liburcu-qsbr.la liburcu-bp.la + +liburcu_la_SOURCES = urcu.c urcu-pointer.c + +liburcu_mb_la_SOURCES = urcu.c urcu-pointer.c +liburcu_mb_la_CFLAGS = -DURCU_MB + +liburcu_bp_la_SOURCES = urcu-bp.c urcu-pointer.c + +liburcu_defer_la_SOURCES = urcu-defer.c + +liburcu_qsbr_la_SOURCES = urcu-qsbr.c urcu-pointer.c + +*.h *.c: urcu/arch.h urcu/uatomic_arch.h + +urcu/arch.h: $(top_srcdir)/urcu/arch_@ARCHTYPE@.h + mkdir -p $(top_builddir)/urcu + cp -f $(top_srcdir)/urcu/arch_@ARCHTYPE@.h $(top_builddir)/urcu/arch.h + +urcu/uatomic_arch.h: $(top_srcdir)/urcu/uatomic_arch_@ARCHTYPE@.h + mkdir -p $(top_builddir)/urcu + cp -f $(top_srcdir)/urcu/uatomic_arch_@ARCHTYPE@.h $(top_builddir)/urcu/uatomic_arch.h + +clean-local: + rm -f urcu/arch.h urcu/uatomic_arch.h diff --git a/Makefile.build.inc b/Makefile.build.inc deleted file mode 100644 index 010bcf5..0000000 --- a/Makefile.build.inc +++ /dev/null @@ -1,45 +0,0 @@ - -CFLAGS=-Wall -I. - -#optimized -CFLAGS+=-O2 - -#debug information -CFLAGS+=-g - -#RCU debug (slower, with error-checks) -#CFLAGS+=-DDEBUG_RCU - -LDFLAGS=-lpthread - -HOSTTYPE=$(shell uname -m) - -ifeq ("${HOSTTYPE}","x86_64") -ARCHTYPE=x86 -endif -ifeq ("${HOSTTYPE}","i586") -ARCHTYPE=x86 -endif -ifeq ("${HOSTTYPE}","i686") -ARCHTYPE=x86 -endif -ifeq ("${HOSTTYPE}","powerpc") -ARCHTYPE=ppc -endif -ifeq ("${HOSTTYPE}","ppc64") -ARCHTYPE=ppc -endif -ifeq ("${HOSTTYPE}","ppc") -ARCHTYPE=ppc -endif -ifeq ("${HOSTTYPE}","s390") -ARCHTYPE=s390 -endif -ifeq ("${HOSTTYPE}","s390x") -ARCHTYPE=s390 -endif - -#Changing the signal number used by the library. SIGUSR1 by default. -#CFLAGS+=-DSIGURCU=SIGUSR2 - -SRC_DEP=`echo $^ | sed 's/[^ ]*\.h//g'` diff --git a/Makefile.inc b/Makefile.inc deleted file mode 100644 index a27f0c3..0000000 --- a/Makefile.inc +++ /dev/null @@ -1,88 +0,0 @@ - -include Makefile.build.inc - -DIRS=tests - -all: checkarch liburcu.so urcu.o \ - liburcu-qsbr.so urcu-qsbr.o \ - liburcu-mb.so urcu-mb.o \ - liburcu-bp.so urcu-bp.o \ - liburcu-defer.so urcu-defer.o \ - urcu-yield.o \ - subdirs - -checkarch: -ifeq (${ARCHTYPE},) - @echo "Architecture ${HOSTTYPE} is currently unsupported by liburcu" - @exit 1 -endif - -urcu/arch.h: urcu/arch_${ARCHTYPE}.h - cp -f urcu/arch_${ARCHTYPE}.h urcu/arch.h - -urcu/arch_uatomic.h: urcu/arch_uatomic_${ARCHTYPE}.h - cp -f urcu/arch_uatomic_${ARCHTYPE}.h urcu/arch_uatomic.h - -urcu.h: urcu/arch.h urcu/arch_uatomic.h - -urcu-qsbr.h: urcu/arch.h urcu/arch_uatomic.h - -urcu-pointer.o: urcu-pointer.c urcu-pointer.h urcu-pointer-static.h - $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP) - -urcu.o: urcu.c urcu.h - $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP) - -urcu-mb.o: urcu.c urcu.h - $(CC) -fPIC -DURCU_MB ${CFLAGS} -c -o $@ $(SRC_DEP) - -urcu-bp.o: urcu-bp.c urcu-bp.h - $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP) - -urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h - $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP) - -urcu-defer.o: urcu-defer.c urcu-defer.h - $(CC) -fPIC ${CFLAGS} -c -o $@ $(SRC_DEP) - -liburcu.so: urcu.o urcu-pointer.o - $(CC) ${LDFLAGS} -fPIC -shared -o $@ $< - -liburcu-qsbr.so: urcu-qsbr.o urcu-pointer.o - $(CC) ${LDFLAGS} -fPIC -shared -o $@ $< - -liburcu-mb.so: urcu-mb.o urcu-pointer.o - $(CC) ${LDFLAGS} -fPIC -shared -o $@ $< - -liburcu-bp.so: urcu-bp.o urcu-pointer.o - $(CC) ${LDFLAGS} -fPIC -shared -o $@ $< - -liburcu-defer.so: urcu-defer.o - $(CC) ${LDFLAGS} -fPIC -shared -o $@ $< - -urcu-yield.o: urcu.c urcu.h - $(CC) -DDEBUG_YIELD ${CFLAGS} -c -o $@ $(SRC_DEP) - -.PHONY: clean install checkarch tests - -subdirs: - -for d in ${DIRS}; do cd $${d}; ${MAKE} ${MFLAGS} ${EXTRAMFLAGS}; done - -install: liburcu.so - cp -f liburcu.so liburcu-mb.so liburcu-qsbr.so liburcu-defer.so \ - liburcu-bp.so \ - /usr/lib/ - mkdir -p /usr/include/urcu - cp -f urcu/arch.h urcu/arch_uatomic.h urcu/compiler.h \ - urcu/system.h urcu/list.h urcu/rculist.h urcu/hlist.h \ - /usr/include/urcu/ - cp -f urcu.h urcu-static.h \ - urcu-qsbr.h urcu-qsbr-static.h \ - urcu-bp.h urcu-bp-static.h \ - urcu-defer.h urcu-defer-static.h \ - urcu-pointer.h urcu-pointer-static.h \ - /usr/include/ - -clean: - rm -f *.o *.so urcu/arch.h urcu/arch_uatomic.h - -for d in ${DIRS}; do cd $${d}; ${MAKE} clean; done diff --git a/Makefile32 b/Makefile32 deleted file mode 100644 index ab57691..0000000 --- a/Makefile32 +++ /dev/null @@ -1,5 +0,0 @@ -include Makefile.inc - -EXTRAMFLAGS=-f Makefile32 -CFLAGS+=-m32 -LDFLAGS+=-m32 diff --git a/Makefile64 b/Makefile64 deleted file mode 100644 index 83ee8da..0000000 --- a/Makefile64 +++ /dev/null @@ -1,5 +0,0 @@ -include Makefile.inc - -EXTRAMFLAGS=-f Makefile64 -CFLAGS+=-m64 -LDFLAGS+=-m64 diff --git a/README b/README index 0549f24..a2cc296 100644 --- a/README +++ b/README @@ -4,9 +4,9 @@ by Mathieu Desnoyers and Paul E. McKenney BUILDING -------- + ./bootstrap (skip if using tarball) + ./configure make - #force 32-bit build with: make -f Makefile32 - #force 64-bit build with: make -f Makefile64 make install diff --git a/bootstrap b/bootstrap new file mode 100644 index 0000000..c507425 --- /dev/null +++ b/bootstrap @@ -0,0 +1,12 @@ +#! /bin/sh + +set -x +if [ ! -e config ]; then + mkdir config +fi +aclocal +libtoolize --force --copy +autoheader +automake --add-missing --copy +autoconf + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..20dd5e4 --- /dev/null +++ b/configure.ac @@ -0,0 +1,53 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + + +AC_PREREQ([2.63]) +AC_INIT([userspace-rcu], [0.2.2], [mathieu dot desnoyers at polymtl dot ca]) +AC_CONFIG_AUX_DIR([config]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip]) +AC_CONFIG_SRCDIR([urcu.h]) +AC_CONFIG_HEADERS([config.h]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_MAKE_SET +AC_PROG_LIBTOOL + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_INLINE +AC_TYPE_PID_T +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_MALLOC +AC_FUNC_MMAP +AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul]) + +# Find arch type +case $host_cpu in + x86_64) ARCHTYPE="x86";; + i586) ARCHTYPE="x86" ;; + i686) ARCHTYPE="x86" ;; + powerpc) ARCHTYPE="ppc" ;; + ppc64) ARCHTYPE="ppc" ;; + ppc) ARCHTYPE="ppc" ;; + s390) ARCHTYPE="s390" ;; + s390x) ARCHTYPE="s390" ;; + *) ARCHTYPE="unknown";; +esac + +if test "$ARCHTYPE" = "unknown"; then + AC_MSG_ERROR([Unable to detect the architecture.]) +fi +AC_SUBST(ARCHTYPE) + +AM_CONDITIONAL([GCC_API], [test "x@ARCHTYPE@" != xx86 -a "x@ARCHTYPE@" != xppc]) + + +AC_CONFIG_FILES([ + Makefile + tests/Makefile +]) +AC_OUTPUT diff --git a/tests/Makefile b/tests/Makefile deleted file mode 100644 index ab19097..0000000 --- a/tests/Makefile +++ /dev/null @@ -1 +0,0 @@ -include Makefile.inc diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..b1be5b1 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,110 @@ +AM_LDFLAGS=-lpthread +AM_CFLAGS=-I$(top_srcdir) + +noinst_PROGRAMS = 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 \ + test_qsbr_timing test_qsbr urcutorture \ + urcutorture-yield test_mutex test_looplen test_urcu_gc \ + test_urcu_gc_mb test_qsbr_gc test_qsbr_lgc test_urcu_lgc \ + test_urcu_lgc_mb test_qsbr_dynamic_link test_urcu_mb_defer \ + test_uatomic test_urcu_assign test_urcu_assign_dynamic_link \ + test_urcu_bp test_urcu_bp_dynamic_link + +noinst_HEADERS = rcutorture.h + +URCU_SIGNAL=$(top_builddir)/urcu.c $(top_builddir)/urcu-pointer.c +# URCU_SIGNAL_YIELD uses urcu.c but -DDEBUG_YIELD must be defined +URCU_SIGNAL_YIELD=$(top_builddir)/urcu.c $(top_builddir)/urcu-pointer.c +# URCU_MB uses urcu.c but -DURCU_MB must be defined +URCU_MB=$(top_builddir)/urcu.c $(top_builddir)/urcu-pointer.c +URCU_BP=$(top_builddir)/urcu-bp.c $(top_builddir)/urcu-pointer.c +URCU_QSBR=$(top_builddir)/urcu-qsbr.c $(top_builddir)/urcu-pointer.c +# -DURCU_MB must be defined +URCU_MB_DEFER=$(top_builddir)/urcu.c $(top_builddir)/urcu-defer.c $(top_builddir)/urcu-pointer.c + + +if GCC_API +APIHEADER=api_gcc.h +else +APIHEADER=api_@ARCHTYPE@.h +endif + +EXTRA_DIST = $(top_srcdir)/tests/api_*.h + + +test_urcu_SOURCES = test_urcu.c $(URCU_SIGNAL) + +test_urcu_dynamic_link_SOURCES = test_urcu.c $(URCU_SIGNAL) +test_urcu_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) + +test_urcu_timing_SOURCES = test_urcu_timing.c $(URCU_SIGNAL) + +test_rwlock_timing_SOURCES = test_rwlock_timing.c $(URCU_SIGNAL) + +test_rwlock_SOURCES = test_rwlock.c $(URCU_SIGNAL) + +test_perthreadlock_timing_SOURCES = test_perthreadlock_timing.c $(URCU_SIGNAL) + +test_perthreadlock_SOURCES = test_perthreadlock.c $(URCU_SIGNAL) + +test_urcu_yield_SOURCES = test_urcu.c $(URCU_SIGNAL_YIELD) +test_urcu_yield_CFLAGS = -DDEBUG_YIELD $(AM_CFLAGS) + +test_urcu_mb_SOURCES = test_urcu.c $(URCU_MB) +test_urcu_mb_CFLAGS = -DURCU_MB $(AM_CFLAGS) + +test_qsbr_timing_SOURCES = test_qsbr_timing.c $(URCU_QSBR) + +test_qsbr_SOURCES = test_qsbr.c $(URCU_QSBR) + +urcutorture_SOURCES = api.h urcutorture.c $(URCU_SIGNAL) + +urcutorture_yield_SOURCES = api.h urcutorture.c $(URCU_SIGNAL_YIELD) +urcutorture_yield_CFLAGS = -DDEBUG_YIELD $(AM_CFLAGS) + +test_mutex_SOURCES = test_mutex.c $(URCU_SIGNAL) + +test_looplen_SOURCES = test_looplen.c + +test_urcu_gc_SOURCES = test_urcu_gc.c $(URCU_SIGNAL) + +test_urcu_gc_mb_SOURCES = test_urcu_gc.c $(URCU_MB) +test_urcu_gc_mb_CFLAGS = -DURCU_MB $(AM_CFLAGS) + +test_qsbr_gc_SOURCES = test_qsbr_gc.c $(URCU_QSBR) + +test_qsbr_lgc_SOURCES = test_qsbr_gc.c $(URCU_QSBR) +test_qsbr_lgc_CFLAGS = -DTEST_LOCAL_GC $(AM_CFLAGS) + +test_urcu_lgc_SOURCES = test_urcu_gc.c $(URCU_SIGNAL) +test_urcu_lgc_CFLAGS = -DTEST_LOCAL_GC $(AM_CFLAGS) + +test_urcu_lgc_mb_SOURCES = test_urcu_gc.c $(URCU_MB) +test_urcu_lgc_mb_CFLAGS = -DTEST_LOCAL_GC -DURCU_MB $(AM_CFLAGS) + +test_qsbr_dynamic_link_SOURCES = test_qsbr.c $(URCU_QSBR) +test_qsbr_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) + +test_urcu_mb_defer_SOURCES = test_urcu_defer.c $(URCU_MB_DEFER) +test_urcu_mb_defer_CFLAGS = -DURCU_MB $(AM_CFLAGS) + +test_uatomic_SOURCES = test_uatomic.c + +test_urcu_assign_SOURCES = test_urcu_assign.c $(URCU_SIGNAL) + +test_urcu_assign_dynamic_link_SOURCES = test_urcu_assign.c $(URCU_SIGNAL) +test_urcu_assign_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) + +test_urcu_bp_SOURCES = test_urcu_bp.c $(URCU_BP) + +test_urcu_bp_dynamic_link_SOURCES = test_urcu_bp.c $(URCU_BP) +test_urcu_bp_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) + +urcutorture.o: api.h + +api.h: $(APIHEADER) + cp -f $(srcdir)/$(APIHEADER) api.h + +clean-local: + rm -f api.h diff --git a/tests/Makefile.inc b/tests/Makefile.inc deleted file mode 100644 index e2ed3f2..0000000 --- a/tests/Makefile.inc +++ /dev/null @@ -1,141 +0,0 @@ - -include ../Makefile.build.inc - -ifeq ($(findstring ${ARCHTYPE},"x86 ppc"),) -APIHEADER=api_gcc.h -else -APIHEADER=api_${ARCHTYPE}.h -endif - -LIBDIR=.. - -CFLAGS+=-I${LIBDIR} - -URCU_SIGNAL=${LIBDIR}/urcu.o ${LIBDIR}/urcu-pointer.o ${LIBDIR}/urcu.h -URCU_SIGNAL_YIELD=${LIBDIR}/urcu-yield.o ${LIBDIR}/urcu-pointer.o ${LIBDIR}/urcu.h -URCU_MB=${LIBDIR}/urcu-mb.o ${LIBDIR}/urcu-pointer.o ${LIBDIR}/urcu.h -URCU_BP=${LIBDIR}/urcu-bp.o ${LIBDIR}/urcu-pointer.o ${LIBDIR}/urcu.h -URCU_QSBR=${LIBDIR}/urcu-qsbr.o ${LIBDIR}/urcu-pointer.o ${LIBDIR}/urcu-qsbr.h -URCU_MB_DEFER=${LIBDIR}/urcu-mb.o ${LIBDIR}/urcu-defer.o ${LIBDIR}/urcu-pointer.o ${LIBDIR}/urcu.h - -all: 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 urcu-asm.o urcutorture \ - urcutorture-yield test_mutex test_looplen test_urcu_gc \ - test_urcu_gc_mb test_qsbr_gc test_qsbr_lgc test_urcu_lgc \ - test_urcu_lgc_mb test_qsbr_dynamic_link test_urcu_mb_defer \ - test_uatomic test_urcu_assign test_urcu_assign_dynamic_link \ - test_urcu_bp test_urcu_bp_dynamic_link - -api.h: ${APIHEADER} - cp -f ${APIHEADER} api.h - -test_looplen: test_looplen.c ${LIBDIR}/urcu.h - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - - -test_urcu: test_urcu.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_urcu_gc: test_urcu_gc.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_urcu_lgc: test_urcu_gc.c ${URCU_SIGNAL} - $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_urcu_assign: test_urcu_assign.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_urcu_assign_dynamic_link: test_urcu_assign.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP) - - -test_urcu_mb: test_urcu.c ${URCU_MB} - $(CC) -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_urcu_gc_mb: test_urcu_gc.c ${URCU_MB} - $(CC) -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_urcu_lgc_mb: test_urcu_gc.c ${URCU_MB} - $(CC) -DTEST_LOCAL_GC -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_urcu_mb_defer: test_urcu_defer.c ${URCU_MB_DEFER} - $(CC) -DURCU_MB ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - - -test_qsbr: test_qsbr.c ${URCU_QSBR} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_qsbr_gc: test_qsbr_gc.c ${URCU_QSBR} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_qsbr_lgc: test_qsbr_gc.c ${URCU_QSBR} - $(CC) -DTEST_LOCAL_GC ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_qsbr_dynamic_link: test_qsbr.c ${URCU_QSBR} - $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP) - - -test_rwlock: test_rwlock.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_perthreadlock: test_perthreadlock.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_mutex: test_mutex.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_urcu_dynamic_link: test_urcu.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} -DDYNAMIC_LINK_TEST $(LDFLAGS) -o $@ $(SRC_DEP) - - -test_urcu_bp: test_urcu_bp.c ${URCU_BP} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_urcu_bp_dynamic_link: test_urcu_bp.c ${URCU_BP} - $(CC) -DDYNAMIC_LINK_TEST ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - - -test_urcu_yield: test_urcu.c ${URCU_SIGNAL_YIELD} - $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_urcu_timing: test_urcu_timing.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_qsbr_timing: test_qsbr_timing.c ${URCU_QSBR} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_rwlock_timing: test_rwlock_timing.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_perthreadlock_timing: test_perthreadlock_timing.c ${URCU_SIGNAL} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -urcu-asm.S: urcu-asm.c ${LIBDIR}/urcu.h - $(CC) ${CFLAGS} -S -o $@ $(SRC_DEP) - -urcu-asm.o: urcu-asm.c ${LIBDIR}/urcu.h - $(CC) ${CFLAGS} -c -o $@ $(SRC_DEP) - -urcutorture: urcutorture.c rcutorture.h api.h ${URCU_SIGNAL} - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -urcutorture-yield: urcutorture.c ${URCU_SIGNAL_YIELD} rcutorture.h api.h - $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -test_uatomic: test_uatomic.c ../urcu/arch_uatomic.h - $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP) - -,PHONY: clean - -clean: - 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 api.h \ - test_mutex test_urcu_gc test_urcu_gc_mb urcu-asm-1.S \ - test_qsbr_lgc test_qsbr_gc test_looplen test_urcu_lgc \ - test_urcu_lgc_mb test_qsbr_dynamic_link test_urcu_mb_defer \ - test_uatomic diff --git a/tests/Makefile32 b/tests/Makefile32 deleted file mode 100644 index ab57691..0000000 --- a/tests/Makefile32 +++ /dev/null @@ -1,5 +0,0 @@ -include Makefile.inc - -EXTRAMFLAGS=-f Makefile32 -CFLAGS+=-m32 -LDFLAGS+=-m32 diff --git a/tests/Makefile64 b/tests/Makefile64 deleted file mode 100644 index 83ee8da..0000000 --- a/tests/Makefile64 +++ /dev/null @@ -1,5 +0,0 @@ -include Makefile.inc - -EXTRAMFLAGS=-f Makefile64 -CFLAGS+=-m64 -LDFLAGS+=-m64 diff --git a/tests/test_uatomic.c b/tests/test_uatomic.c index 6c11a2d..68cb6df 100644 --- a/tests/test_uatomic.c +++ b/tests/test_uatomic.c @@ -1,6 +1,6 @@ #include #include -#include +#include #if (defined(__i386__) || defined(__x86_64__)) #define HAS_ATOMIC_BYTE diff --git a/tests/urcutorture.c b/tests/urcutorture.c index 87f51a1..2eba4d5 100644 --- a/tests/urcutorture.c +++ b/tests/urcutorture.c @@ -6,6 +6,6 @@ #include "api.h" #define _LGPL_SOURCE #include -#include +#include #include #include "rcutorture.h" diff --git a/urcu-bp-static.h b/urcu-bp-static.h index 428c53f..ff16fd4 100644 --- a/urcu-bp-static.h +++ b/urcu-bp-static.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include /* diff --git a/urcu-defer-static.h b/urcu-defer-static.h index 593f9a8..b27cfe1 100644 --- a/urcu-defer-static.h +++ b/urcu-defer-static.h @@ -34,7 +34,7 @@ #include #include -#include +#include #include diff --git a/urcu-pointer-static.h b/urcu-pointer-static.h index 0a01f1f..33bfdee 100644 --- a/urcu-pointer-static.h +++ b/urcu-pointer-static.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include /** * _rcu_dereference - reads (copy) a RCU-protected pointer to a local variable diff --git a/urcu-pointer.h b/urcu-pointer.h index b10aa13..948ac42 100644 --- a/urcu-pointer.h +++ b/urcu-pointer.h @@ -28,7 +28,7 @@ #include #include -#include +#include #ifdef _LGPL_SOURCE diff --git a/urcu-qsbr-static.h b/urcu-qsbr-static.h index d4cb6a9..150bc09 100644 --- a/urcu-qsbr-static.h +++ b/urcu-qsbr-static.h @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #define futex(...) syscall(__NR_futex, __VA_ARGS__) diff --git a/urcu-static.h b/urcu-static.h index 30bd7fd..2e7371e 100644 --- a/urcu-static.h +++ b/urcu-static.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #define futex(...) syscall(__NR_futex, __VA_ARGS__) diff --git a/urcu/arch_uatomic_ppc.h b/urcu/uatomic_arch_ppc.h similarity index 100% rename from urcu/arch_uatomic_ppc.h rename to urcu/uatomic_arch_ppc.h diff --git a/urcu/arch_uatomic_s390.h b/urcu/uatomic_arch_s390.h similarity index 100% rename from urcu/arch_uatomic_s390.h rename to urcu/uatomic_arch_s390.h diff --git a/urcu/arch_uatomic_x86.h b/urcu/uatomic_arch_x86.h similarity index 100% rename from urcu/arch_uatomic_x86.h rename to urcu/uatomic_arch_x86.h -- 2.34.1