diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 124 |
1 files changed, 122 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 552b75a35f..d1c52b0f52 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ # Copyright (c) 2001-2004, Roger Dingledine # Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson -# Copyright (c) 2007-2017, The Tor Project, Inc. +# Copyright (c) 2007-2018, The Tor Project, Inc. # See LICENSE for licensing information ACLOCAL_AMFLAGS = -I m4 @@ -15,7 +15,12 @@ TESTS= noinst_PROGRAMS= DISTCLEANFILES= bin_SCRIPTS= -AM_CPPFLAGS= +AM_CPPFLAGS=\ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/ext \ + -I$(top_srcdir)/src/ext/trunnel \ + -I$(top_srcdir)/src/trunnel + AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@ @TOR_LZMA_CFLAGS@ @TOR_ZSTD_CFLAGS@ SHELL=@SHELL@ @@ -33,6 +38,99 @@ else rust_ldadd= endif +# "Common" libraries used to link tor's utility code. +TOR_UTIL_LIBS = \ + src/common/libor.a \ + src/lib/libtor-process.a \ + src/lib/libtor-time.a \ + src/lib/libtor-fs.a \ + src/lib/libtor-encoding.a \ + src/lib/libtor-sandbox.a \ + src/lib/libtor-container.a \ + src/lib/libtor-net.a \ + src/lib/libtor-thread.a \ + src/lib/libtor-memarea.a \ + src/lib/libtor-math.a \ + src/lib/libtor-meminfo.a \ + src/lib/libtor-osinfo.a \ + src/lib/libtor-log.a \ + src/lib/libtor-lock.a \ + src/lib/libtor-fdio.a \ + src/lib/libtor-string.a \ + src/lib/libtor-term.a \ + src/lib/libtor-smartlist-core.a \ + src/lib/libtor-malloc.a \ + src/lib/libtor-wallclock.a \ + src/lib/libtor-err.a \ + src/lib/libtor-intmath.a \ + src/lib/libtor-ctime.a + +# Variants of the above for linking the testing variant of tor (for coverage +# and tests) +TOR_UTIL_TESTING_LIBS = \ + src/common/libor-testing.a \ + src/lib/libtor-process-testing.a \ + src/lib/libtor-time-testing.a \ + src/lib/libtor-fs-testing.a \ + src/lib/libtor-encoding-testing.a \ + src/lib/libtor-sandbox-testing.a \ + src/lib/libtor-container-testing.a \ + src/lib/libtor-net-testing.a \ + src/lib/libtor-thread-testing.a \ + src/lib/libtor-memarea-testing.a \ + src/lib/libtor-math-testing.a \ + src/lib/libtor-meminfo-testing.a \ + src/lib/libtor-osinfo-testing.a \ + src/lib/libtor-term-testing.a \ + src/lib/libtor-log-testing.a \ + src/lib/libtor-lock-testing.a \ + src/lib/libtor-fdio-testing.a \ + src/lib/libtor-string-testing.a \ + src/lib/libtor-smartlist-core-testing.a \ + src/lib/libtor-malloc-testing.a \ + src/lib/libtor-wallclock-testing.a \ + src/lib/libtor-err-testing.a \ + src/lib/libtor-intmath.a \ + src/lib/libtor-ctime-testing.a + +# Internal crypto libraries used in Tor +TOR_CRYPTO_LIBS = \ + src/lib/libtor-tls.a \ + src/lib/libtor-crypt-ops.a \ + $(LIBKECCAK_TINY) \ + $(LIBDONNA) + +# Variants of the above for linking the testing variant of tor (for coverage +# and tests) +TOR_CRYPTO_TESTING_LIBS = \ + src/lib/libtor-tls-testing.a \ + src/lib/libtor-crypt-ops-testing.a \ + $(LIBKECCAK_TINY) \ + $(LIBDONNA) + +# All static libraries used to link tor. +TOR_INTERNAL_LIBS = \ + src/or/libtor-app.a \ + src/lib/libtor-compress.a \ + $(TOR_CRYPTO_LIBS) \ + $(TOR_UTIL_LIBS) \ + src/common/libor-event.a \ + src/trunnel/libor-trunnel.a \ + src/lib/libtor-trace.a + +# Variants of the above for linking the testing variant of tor (for coverage +# and tests) +TOR_INTERNAL_TESTING_LIBS = \ + src/or/libtor-app-testing.a \ + src/lib/libtor-compress-testing.a \ + $(TOR_CRYPTO_TESTING_LIBS) \ + $(TOR_UTIL_TESTING_LIBS) \ + src/common/libor-event-testing.a \ + src/trunnel/libor-trunnel-testing.a \ + src/lib/libtor-trace.a + +# All libraries used to link tor-cov + include src/include.am include doc/include.am include contrib/include.am @@ -45,6 +143,7 @@ EXTRA_DIST+= \ Makefile.nmake \ README \ ReleaseNotes \ + scripts/maint/checkIncludes.py \ scripts/maint/checkSpace.pl ## This tells etags how to find mockable function definitions. @@ -206,12 +305,19 @@ check-spaces: if USE_PERL $(PERL) $(top_srcdir)/scripts/maint/checkSpace.pl -C \ $(top_srcdir)/src/common/*.[ch] \ + $(top_srcdir)/src/lib/*/*.[ch] \ $(top_srcdir)/src/or/*.[ch] \ + $(top_srcdir)/src/or/*/*.[ch] \ $(top_srcdir)/src/test/*.[ch] \ $(top_srcdir)/src/test/*/*.[ch] \ $(top_srcdir)/src/tools/*.[ch] endif +check-includes: +if USEPYTHON + $(top_srcdir)/scripts/maint/checkIncludes.py +endif + check-docs: all $(PERL) $(top_builddir)/scripts/maint/checkOptionDocs.pl @@ -239,6 +345,20 @@ check-typos: echo "You can install the latest version of misspell here: https://github.com/client9/misspell#install"; \ fi +.PHONY: clippy +clippy: +if USE_RUST + @if test -x "`which cargo-clippy 2>&1;true`"; then \ + echo "Running cargo clippy ..."; \ + echo "Prepare yourself for the onslaught of suggestions ..."; \ + (cd "$(top_srcdir)/src/rust" && cargo clippy); \ + else \ + echo "Tor can use clippy to lint Rust code."; \ + echo "However, it seems that you don't have clippy installed."; \ + echo "You can install the latest version of clippy by following the directions here: https://github.com/rust-lang-nursery/rust-clippy"; \ + fi +endif + .PHONY: check-changes check-changes: if USEPYTHON |