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.am55
1 files changed, 45 insertions, 10 deletions
diff --git a/src/or/include.am b/src/or/include.am
index c1e23dd3d9..59d593a5e9 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -41,10 +41,8 @@ LIBTOR_A_SOURCES = \
src/or/consdiffmgr.c \
src/or/control.c \
src/or/cpuworker.c \
- src/or/dircollate.c \
src/or/directory.c \
src/or/dirserv.c \
- src/or/dirvote.c \
src/or/dns.c \
src/or/dnsserv.c \
src/or/dos.c \
@@ -76,8 +74,6 @@ LIBTOR_A_SOURCES = \
src/or/onion.c \
src/or/onion_fast.c \
src/or/onion_tap.c \
- src/or/shared_random.c \
- src/or/shared_random_state.c \
src/or/transports.c \
src/or/parsecommon.c \
src/or/periodic.c \
@@ -91,6 +87,7 @@ LIBTOR_A_SOURCES = \
src/or/policies.c \
src/or/reasons.c \
src/or/relay.c \
+ src/or/relay_crypto.c \
src/or/rendcache.c \
src/or/rendclient.c \
src/or/rendcommon.c \
@@ -106,15 +103,43 @@ LIBTOR_A_SOURCES = \
src/or/scheduler.c \
src/or/scheduler_kist.c \
src/or/scheduler_vanilla.c \
+ src/or/shared_random_client.c \
src/or/statefile.c \
src/or/status.c \
src/or/torcert.c \
src/or/tor_api.c \
+ src/or/voting_schedule.c \
src/or/onion_ntor.c \
$(tor_platform_source)
+#
+# Modules are conditionnally compiled in tor starting here. We add the C files
+# 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. See the UNITTESTS_ENABLED branch below.
+#
+LIBTOR_TESTING_A_SOURCES = $(LIBTOR_A_SOURCES)
+
+# The Directory Authority module.
+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)
+if UNITTESTS_ENABLED
+
+# Add the sources of the modules that are needed for tests to work here.
+LIBTOR_TESTING_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
+
+src_or_libtor_testing_a_SOURCES = $(LIBTOR_TESTING_A_SOURCES)
+else
+src_or_libtor_testing_a_SOURCES =
+endif
src_or_tor_SOURCES = src/or/tor_main.c
AM_CPPFLAGS += -I$(srcdir)/src/or -Isrc/or
@@ -184,10 +209,8 @@ ORHEADERS = \
src/or/consdiffmgr.h \
src/or/control.h \
src/or/cpuworker.h \
- src/or/dircollate.h \
src/or/directory.h \
src/or/dirserv.h \
- src/or/dirvote.h \
src/or/dns.h \
src/or/dns_structs.h \
src/or/dnsserv.h \
@@ -224,8 +247,6 @@ ORHEADERS = \
src/or/onion_ntor.h \
src/or/onion_tap.h \
src/or/or.h \
- src/or/shared_random.h \
- src/or/shared_random_state.h \
src/or/transports.h \
src/or/parsecommon.h \
src/or/periodic.h \
@@ -238,6 +259,7 @@ ORHEADERS = \
src/or/proto_socks.h \
src/or/reasons.h \
src/or/relay.h \
+ src/or/relay_crypto.h \
src/or/rendcache.h \
src/or/rendclient.h \
src/or/rendcommon.h \
@@ -252,10 +274,23 @@ ORHEADERS = \
src/or/routerset.h \
src/or/routerparse.h \
src/or/scheduler.h \
+ src/or/shared_random_client.h \
src/or/statefile.h \
src/or/status.h \
src/or/torcert.h \
- src/or/tor_api_internal.h
+ src/or/tor_api_internal.h \
+ src/or/voting_schedule.h
+
+# We add the headers of the modules even though they are disabled so we can
+# properly compiled the entry points stub.
+
+# The Directory Authority module headers.
+ORHEADERS += \
+ src/or/dirauth/dircollate.h \
+ src/or/dirauth/dirvote.h \
+ src/or/dirauth/mode.h \
+ src/or/dirauth/shared_random.h \
+ src/or/dirauth/shared_random_state.h
# This may someday want to be an installed file?
noinst_HEADERS += src/or/tor_api.h