aboutsummaryrefslogtreecommitdiff
path: root/src/app/include.am
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-05 16:04:32 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-05 17:15:50 -0400
commit81cb0afb2b0163d95a435583041dce1064eec65c (patch)
tree69f13e56ecb7e0dd899636ef70185c9416ac2448 /src/app/include.am
parent4eac5c6ce6f19829bf1aed46e8d3d72fa3ae1a74 (diff)
downloadtor-81cb0afb2b0163d95a435583041dce1064eec65c.tar.gz
tor-81cb0afb2b0163d95a435583041dce1064eec65c.zip
Start splitting src/or
This is a very gentle commit that just lays the groundwork in the build system: it puts the include files to build libtor-app.a into src/core, and to build the tor executable into src/app. The executable is now "src/app/tor".
Diffstat (limited to 'src/app/include.am')
-rw-r--r--src/app/include.am38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/app/include.am b/src/app/include.am
new file mode 100644
index 0000000000..bbbffb3e59
--- /dev/null
+++ b/src/app/include.am
@@ -0,0 +1,38 @@
+
+bin_PROGRAMS+= src/app/tor
+
+if COVERAGE_ENABLED
+noinst_PROGRAMS+= src/app/tor-cov
+endif
+
+noinst_HEADERS += \
+ src/app/ntmain.h
+
+src_app_tor_SOURCES = src/app/tor_main.c
+if BUILD_NT_SERVICES
+src_app_tor_SOURCES += src/app/ntmain.c
+endif
+
+# -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
+# This seems to matter nowhere but on windows, but I assure you that it
+# matters a lot there, and is quite hard to debug if you forget to do it.
+
+src_app_tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
+src_app_tor_LDADD = $(TOR_INTERNAL_LIBS) \
+ $(rust_ldadd) \
+ @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
+ @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
+ @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@ \
+ @TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
+
+if COVERAGE_ENABLED
+src_app_tor_cov_SOURCES = $(src_app_tor_SOURCES)
+src_app_tor_cov_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
+src_app_tor_cov_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
+src_app_tor_cov_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
+src_app_tor_cov_LDADD = $(TOR_INTERNAL_TESTING_LIBS) \
+ @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
+ @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ \
+ @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@ \
+ @TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
+endif