Port: Fixes to build system for portability
[urcu.git] / Makefile.am
index ff7f1bb01b3fd7d8e8f0f411de232e3cecff7be3..f41e3358ad1c4b788e14685a32216f3b60428be5 100644 (file)
@@ -1,28 +1,39 @@
-INCLUDES = -I$(top_builddir)/urcu
+ACLOCAL_AMFLAGS=-I m4
+
+AM_CPPFLAGS = -I$(top_builddir)/urcu
 
 #Add the -version-info directly here since we are only building
 # library that use the version-info
-AM_LDFLAGS=-lpthread -version-info $(URCU_LIBRARY_VERSION)
+AM_LDFLAGS=-version-info $(URCU_LIBRARY_VERSION)
+if !LIBC_INCLUDES_PTHREAD
+AM_LDFLAGS+=-lpthread
+endif
 AM_CFLAGS=-Wall
 
-SUBDIRS = . tests
+SUBDIRS = . doc tests
 
 include_HEADERS = urcu.h urcu-bp.h urcu-call-rcu.h urcu-defer.h \
-               urcu-pointer.h urcu-qsbr.h
+               urcu-pointer.h urcu-qsbr.h urcu-flavor.h
 nobase_dist_include_HEADERS = urcu/compiler.h urcu/hlist.h urcu/list.h \
                urcu/rculist.h urcu/rcuhlist.h urcu/system.h urcu/futex.h \
                urcu/uatomic/generic.h urcu/arch/generic.h urcu/wfstack.h \
                urcu/wfqueue.h urcu/rculfstack.h urcu/rculfqueue.h \
-               urcu/ref.h urcu/map/*.h urcu/static/*.h urcu/cds.h \
-               urcu/urcu_ref.h urcu/urcu-futex.h urcu/uatomic_arch.h \
-               urcu/rculfhash.h
+               urcu/ref.h urcu/cds.h urcu/urcu_ref.h urcu/urcu-futex.h \
+               urcu/uatomic_arch.h urcu/rculfhash.h urcu/wfcqueue.h \
+               urcu/lfstack.h urcu/syscall-compat.h \
+               $(top_srcdir)/urcu/map/*.h \
+               $(top_srcdir)/urcu/static/*.h \
+               urcu/rand-compat.h \
+               urcu/tls-compat.h urcu/debug.h
 nobase_nodist_include_HEADERS = urcu/arch.h urcu/uatomic.h urcu/config.h
 
+dist_noinst_HEADERS = urcu-die.h urcu-wait.h
+
 EXTRA_DIST = $(top_srcdir)/urcu/arch/*.h $(top_srcdir)/urcu/uatomic/*.h \
                gpl-2.0.txt lgpl-2.1.txt lgpl-relicensing.txt \
-               README LICENSE compat_arch_x86.c \
+               LICENSE compat_arch_x86.c \
                urcu-call-rcu-impl.h urcu-defer-impl.h \
-               ChangeLog
+               rculfhash-internal.h
 
 if COMPAT_ARCH
 COMPAT=compat_arch_@ARCHTYPE@.c
@@ -30,9 +41,10 @@ else
 COMPAT=
 endif
 
-if COMPAT_FUTEX
 COMPAT+=compat_futex.c
-endif
+
+RCULFHASH = rculfhash.c rculfhash-mm-order.c rculfhash-mm-chunk.c \
+               rculfhash-mm-mmap.c
 
 lib_LTLIBRARIES = liburcu-common.la \
                liburcu.la liburcu-qsbr.la \
@@ -43,7 +55,7 @@ lib_LTLIBRARIES = liburcu-common.la \
 # liburcu-common contains wait-free queues (needed by call_rcu) as well
 # as futex fallbacks.
 #
-liburcu_common_la_SOURCES = wfqueue.c wfstack.c $(COMPAT)
+liburcu_common_la_SOURCES = wfqueue.c wfcqueue.c wfstack.c $(COMPAT)
 
 liburcu_la_SOURCES = urcu.c urcu-pointer.c $(COMPAT)
 liburcu_la_LIBADD = liburcu-common.la
@@ -62,9 +74,22 @@ liburcu_signal_la_LIBADD = liburcu-common.la
 liburcu_bp_la_SOURCES = urcu-bp.c urcu-pointer.c $(COMPAT)
 liburcu_bp_la_LIBADD = liburcu-common.la
 
-liburcu_cds_la_SOURCES = rculfqueue.c rculfstack.c rculfhash.c $(COMPAT)
+liburcu_cds_la_SOURCES = rculfqueue.c rculfstack.c lfstack.c \
+       $(RCULFHASH) $(COMPAT)
 liburcu_cds_la_LIBADD = liburcu-common.la
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = liburcu-cds.pc liburcu.pc liburcu-bp.pc liburcu-qsbr.pc \
        liburcu-signal.pc liburcu-mb.pc
+
+dist_doc_DATA = README.md ChangeLog
+
+dist_noinst_DATA = CodingStyle
+
+.PHONY: short_bench long_bench regtest
+short_bench:
+       cd tests && $(MAKE) $(AM_MAKEFLAGS) short_bench
+long_bench:
+       cd tests && $(MAKE) $(AM_MAKEFLAGS) long_bench
+regtest:
+       cd tests && $(MAKE) $(AM_MAKEFLAGS) regtest
This page took 0.023131 seconds and 4 git commands to generate.