aboutsummaryrefslogtreecommitdiff
path: root/src/lib/thread/include.am
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-28 09:14:42 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-28 09:14:42 -0400
commit9cf335c9a5fe6767e90cc5cfdc1f5c95465edb10 (patch)
tree04e771dcb1c0c577b221a5a4f4b11ffa677972af /src/lib/thread/include.am
parent544ab27a949406628809869111b7288017a5bcb1 (diff)
downloadtor-9cf335c9a5fe6767e90cc5cfdc1f5c95465edb10.tar.gz
tor-9cf335c9a5fe6767e90cc5cfdc1f5c95465edb10.zip
Extract threading code into a new library.
Note that the workqueue code does *not* go here: it is logically at a higher level, since it needs to use libevent and the networking stack.
Diffstat (limited to 'src/lib/thread/include.am')
-rw-r--r--src/lib/thread/include.am25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/thread/include.am b/src/lib/thread/include.am
new file mode 100644
index 0000000000..0eac7edeeb
--- /dev/null
+++ b/src/lib/thread/include.am
@@ -0,0 +1,25 @@
+
+noinst_LIBRARIES += src/lib/libtor-thread.a
+
+if UNITTESTS_ENABLED
+noinst_LIBRARIES += src/lib/libtor-thread-testing.a
+endif
+
+if THREADS_PTHREADS
+threads_impl_source=src/lib/thread/compat_pthreads.c
+endif
+if THREADS_WIN32
+threads_impl_source=src/lib/thread/compat_winthreads.c
+endif
+
+src_lib_libtor_thread_a_SOURCES = \
+ src/lib/thread/compat_threads.c \
+ $(threads_impl_source)
+
+src_lib_libtor_thread_testing_a_SOURCES = \
+ $(src_lib_libtor_thread_a_SOURCES)
+src_lib_libtor_thread_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
+src_lib_libtor_thread_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
+
+noinst_HEADERS += \
+ src/lib/thread/threads.h