From e9dbb5e395097f4ae38d17cf27408c2688b90d2b Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 18 Sep 2020 12:17:02 -0400 Subject: Build one big .a library full of Tor's implementation. This is experimental and probably will break some platforms --- Makefile.am | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 136368088e..50b002139e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,6 +14,7 @@ CLEANFILES= TESTS= noinst_PROGRAMS= DISTCLEANFILES= +MOSTLYCLEANFILES= bin_SCRIPTS= AM_CPPFLAGS=\ -I$(top_srcdir)/src \ @@ -137,6 +138,13 @@ TOR_INTERNAL_LIBS = \ src/trunnel/libor-trunnel.a \ src/lib/libtor-trace.a +libtor.a: $(TOR_INTERNAL_LIBS) + $(AM_V_AR) export AR="$(AR)"; \ + export ARFLAGS="$(ARFLAGS)"; \ + $(top_srcdir)/scripts/build/combine_libs libtor.a $(TOR_INTERNAL_LIBS) + +MOSTLYCLEANFILES += libtor.a + # Variants of the above for linking the testing variant of tor (for coverage # and tests) if UNITTESTS_ENABLED @@ -148,6 +156,14 @@ TOR_INTERNAL_TESTING_LIBS = \ $(TOR_UTIL_TESTING_LIBS) \ src/trunnel/libor-trunnel-testing.a \ src/lib/libtor-trace.a + +src/test/libtor-testing.a: $(TOR_INTERNAL_TESTING_LIBS) + $(AM_V_AR) export AR="$(AR)"; \ + export ARFLAGS="$(ARFLAGS)"; \ + export RANLIB="$(RANLIB)"; \ + $(top_srcdir)/scripts/build/combine_libs src/test/libtor-testing.a $(TOR_INTERNAL_TESTING_LIBS) + +MOSTLYCLEANFILES += src/test/libtor-testing.a endif TOR_LDFLAGS_CRYPTLIB=@TOR_LDFLAGS_openssl@ @@ -175,6 +191,7 @@ EXTRA_DIST+= \ Makefile.nmake \ README \ ReleaseNotes \ + scripts/build/combine_libs \ scripts/maint/checkIncludes.py \ scripts/maint/checkSpace.pl \ scripts/maint/checkSpaceTest.sh \ @@ -701,7 +718,7 @@ show-distdir-core: file $(distdir)/_build/core; fi show-libs: - @echo $(TOR_INTERNAL_LIBS) + @echo libtor.a show-testing-libs: - @echo $(TOR_INTERNAL_TESTING_LIBS) + @echo src/test/libtor-testing.a -- cgit v1.2.3-54-g00ecf