aboutsummaryrefslogtreecommitdiff
path: root/src/core/include.am
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-12-15 18:10:11 -0500
committerNick Mathewson <nickm@torproject.org>2019-12-19 07:54:56 -0500
commit5e2318165dba782f6daa6620b17e0fa1e72b4b11 (patch)
tree3f2beaef55248c114d6d36083ded4989e186dfbb /src/core/include.am
parent1d0ccda5955957c6c09a081502b315ba21c7c62e (diff)
downloadtor-5e2318165dba782f6daa6620b17e0fa1e72b4b11.tar.gz
tor-5e2318165dba782f6daa6620b17e0fa1e72b4b11.zip
Add "stub" files for disabled modules.
These modules are only built when the selected modules are disabled. The provide stub implementations of the subsystem blocks. Later, other stub implementations could move here. Having real subsystem blocks here will let us handle disabled configuration options better.
Diffstat (limited to 'src/core/include.am')
-rw-r--r--src/core/include.am13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/include.am b/src/core/include.am
index 83230fb3ca..ab4adeaf66 100644
--- a/src/core/include.am
+++ b/src/core/include.am
@@ -157,6 +157,11 @@ LIBTOR_APP_A_SOURCES = \
src/feature/stats/rephist.c \
src/feature/stats/predict_ports.c
+#
+# Sources that we only add for the real libtor_a, and not for testing.
+#
+LIBTOR_APP_A_STUB_SOURCES =
+
if BUILD_NT_SERVICES
LIBTOR_APP_A_SOURCES += src/app/main/ntmain.c
endif
@@ -199,13 +204,19 @@ MODULE_DIRAUTH_SOURCES = \
if BUILD_MODULE_RELAY
LIBTOR_APP_A_SOURCES += $(MODULE_RELAY_SOURCES)
+else
+LIBTOR_APP_A_STUB_SOURCES += src/feature/relay/relay_stub.c
endif
if BUILD_MODULE_DIRAUTH
LIBTOR_APP_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
+else
+LIBTOR_APP_A_STUB_SOURCES += src/feature/dirauth/dirauth_stub.c
endif
-src_core_libtor_app_a_SOURCES = $(LIBTOR_APP_A_SOURCES)
+src_core_libtor_app_a_SOURCES = \
+ $(LIBTOR_APP_A_SOURCES) \
+ $(LIBTOR_APP_A_STUB_SOURCES)
if UNITTESTS_ENABLED
# Add the sources of the modules that are needed for tests to work here.