aboutsummaryrefslogtreecommitdiff
path: root/src/or/include.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/include.am')
-rw-r--r--src/or/include.am11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/include.am b/src/or/include.am
index 93f405d619..bb505937ac 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -114,20 +114,23 @@ LIBTOR_A_SOURCES = \
#
# Modules are conditionnally compiled in tor starting here. We add the C files
-# only if the modules has been enabled at configure time.
+# only if the modules has been enabled at configure time. We always add the
+# source files of every module to libtor-testing.a so we can build the unit
+# tests for everything.
#
# The Directory Authority module.
-if BUILD_MODULE_DIRAUTH
-LIBTOR_A_SOURCES += \
+MODULE_DIRAUTH_SOURCES = \
src/or/dirauth/dircollate.c \
src/or/dirauth/dirvote.c \
src/or/dirauth/shared_random.c \
src/or/dirauth/shared_random_state.c
+if BUILD_MODULE_DIRAUTH
+LIBTOR_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
endif
src_or_libtor_a_SOURCES = $(LIBTOR_A_SOURCES)
-src_or_libtor_testing_a_SOURCES = $(LIBTOR_A_SOURCES)
+src_or_libtor_testing_a_SOURCES = $(LIBTOR_A_SOURCES) $(MODULE_DIRAUTH_SOURCES)
src_or_tor_SOURCES = src/or/tor_main.c
AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or