aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorStewart Smith <stewart@flamingspork.com>2012-08-02 23:31:43 +1000
committerNick Mathewson <nickm@torproject.org>2012-08-09 11:03:47 -0400
commit2a4a1496241d6c4183763f90600be4775ccb5470 (patch)
tree99ec92b85e229d4e8aee6b90a0f1aede1dad180a /src/tools
parentca90aea5ebde66565fbb6fb5d0e88a970d3563a5 (diff)
downloadtor-2a4a1496241d6c4183763f90600be4775ccb5470.tar
tor-2a4a1496241d6c4183763f90600be4775ccb5470.tar.gz
Move to non-recursive make
This gives us a few benefits: 1) make -j clean all this will start working, as it should. It currently doesn't. 2) increased parallel build recursive make will max out at number of files in a directory, non-recursive make doesn't have such a limitation 3) Removal of duplicate information in make files, less error prone I've also slightly updated how we call AM_INIT_AUTOMAKE, as the way that was used was not only deprecated but will be *removed* in the next major automake release (1.13).... so probably best that we can continue to bulid tor without requiring old automake. (see http://www.gnu.org/software/automake/manual/html_node/Public-Macros.html ) For more reasons why, see resources such as: http://miller.emu.id.au/pmiller/books/rmch/
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/Makefile.am22
-rw-r--r--src/tools/include.am22
-rw-r--r--src/tools/tor-fw-helper/Makefile.am38
-rw-r--r--src/tools/tor-fw-helper/include.am36
4 files changed, 58 insertions, 60 deletions
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
deleted file mode 100644
index 35b0a41f5..000000000
--- a/src/tools/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-bin_PROGRAMS = tor-resolve tor-gencert
-noinst_PROGRAMS = tor-checkkey
-
-tor_resolve_SOURCES = tor-resolve.c
-tor_resolve_LDFLAGS =
-tor_resolve_LDADD = ../common/libor.a @TOR_LIB_MATH@ @TOR_LIB_WS32@
-
-tor_gencert_SOURCES = tor-gencert.c
-tor_gencert_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
-tor_gencert_LDADD = ../common/libor.a ../common/libor-crypto.a \
- @TOR_LIB_MATH@ @TOR_ZLIB_LIBS@ @TOR_OPENSSL_LIBS@ \
- @TOR_LIB_WS32@ @TOR_LIB_GDI@
-
-tor_checkkey_SOURCES = tor-checkkey.c
-tor_checkkey_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
-tor_checkkey_LDADD = ../common/libor.a ../common/libor-crypto.a \
- @TOR_LIB_MATH@ @TOR_ZLIB_LIBS@ @TOR_OPENSSL_LIBS@ \
- @TOR_LIB_WS32@ @TOR_LIB_GDI@
-
-SUBDIRS = tor-fw-helper
-DIST_SUBDIRS = tor-fw-helper
-
diff --git a/src/tools/include.am b/src/tools/include.am
new file mode 100644
index 000000000..7337eff16
--- /dev/null
+++ b/src/tools/include.am
@@ -0,0 +1,22 @@
+bin_PROGRAMS+= src/tools/tor-resolve src/tools/tor-gencert
+noinst_PROGRAMS+= src/tools/tor-checkkey
+
+src_tools_tor_resolve_SOURCES = src/tools/tor-resolve.c
+src_tools_tor_resolve_LDFLAGS =
+src_tools_tor_resolve_LDADD = src/common/libor.a @TOR_LIB_MATH@ @TOR_LIB_WS32@
+
+src_tools_tor_gencert_SOURCES = src/tools/tor-gencert.c
+src_tools_tor_gencert_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
+src_tools_tor_gencert_LDADD = src/common/libor.a src/common/libor-crypto.a \
+ @TOR_LIB_MATH@ @TOR_ZLIB_LIBS@ @TOR_OPENSSL_LIBS@ \
+ @TOR_LIB_WS32@ @TOR_LIB_GDI@
+
+src_tools_tor_checkkey_SOURCES = src/tools/tor-checkkey.c
+src_tools_tor_checkkey_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
+src_tools_tor_checkkey_LDADD = src/common/libor.a src/common/libor-crypto.a \
+ @TOR_LIB_MATH@ @TOR_ZLIB_LIBS@ @TOR_OPENSSL_LIBS@ \
+ @TOR_LIB_WS32@ @TOR_LIB_GDI@
+
+include src/tools/tor-fw-helper/include.am
+
+
diff --git a/src/tools/tor-fw-helper/Makefile.am b/src/tools/tor-fw-helper/Makefile.am
deleted file mode 100644
index 393562db0..000000000
--- a/src/tools/tor-fw-helper/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-if USE_FW_HELPER
-bin_PROGRAMS = tor-fw-helper
-else
-bin_PROGRAMS =
-endif
-
-tor_fw_helper_SOURCES = \
- tor-fw-helper.c \
- tor-fw-helper-natpmp.c \
- tor-fw-helper-upnp.c
-noinst_HEADERS = \
- tor-fw-helper.h \
- tor-fw-helper-natpmp.h \
- tor-fw-helper-upnp.h
-
-if NAT_PMP
-nat_pmp_ldflags = @TOR_LDFLAGS_libnatpmp@
-nat_pmp_ldadd = -lnatpmp @TOR_LIB_IPHLPAPI@
-nat_pmp_cppflags = @TOR_CPPFLAGS_libnatpmp@
-else
-nat_pmp_ldflags =
-nat_pmp_ldadd =
-nat_pmp_cppflags =
-endif
-
-if MINIUPNPC
-miniupnpc_ldflags = @TOR_LDFLAGS_libminiupnpc@
-miniupnpc_ldadd = -lminiupnpc -lm @TOR_LIB_IPHLPAPI@
-miniupnpc_cppflags = @TOR_CPPFLAGS_libminiupnpc@
-else
-miniupnpc_ldflags =
-miniupnpc_ldadd =
-miniupnpc_cppflags =
-endif
-
-tor_fw_helper_LDFLAGS = $(nat_pmp_ldflags) $(miniupnpc_ldflags)
-tor_fw_helper_LDADD = ../../common/libor.a $(nat_pmp_ldadd) $(miniupnpc_ldadd) @TOR_LIB_WS32@
-tor_fw_helper_CPPFLAGS = $(nat_pmp_cppflags) $(miniupnpc_cppflags)
diff --git a/src/tools/tor-fw-helper/include.am b/src/tools/tor-fw-helper/include.am
new file mode 100644
index 000000000..cb6c9cd56
--- /dev/null
+++ b/src/tools/tor-fw-helper/include.am
@@ -0,0 +1,36 @@
+if USE_FW_HELPER
+bin_PROGRAMS+= src/tools/tor-fw-helper/tor-fw-helper
+endif
+
+src_tools_tor_fw_helper_tor_fw_helper_SOURCES = \
+ src/tools/tor-fw-helper/tor-fw-helper.c \
+ src/tools/tor-fw-helper/tor-fw-helper-natpmp.c \
+ src/tools/tor-fw-helper/tor-fw-helper-upnp.c
+noinst_HEADERS+= \
+ src/tools/tor-fw-helper/tor-fw-helper.h \
+ src/tools/tor-fw-helper/tor-fw-helper-natpmp.h \
+ src/tools/tor-fw-helper/tor-fw-helper-upnp.h
+
+if NAT_PMP
+nat_pmp_ldflags = @TOR_LDFLAGS_libnatpmp@
+nat_pmp_ldadd = -lnatpmp @TOR_LIB_IPHLPAPI@
+nat_pmp_cppflags = @TOR_CPPFLAGS_libnatpmp@
+else
+nat_pmp_ldflags =
+nat_pmp_ldadd =
+nat_pmp_cppflags =
+endif
+
+if MINIUPNPC
+miniupnpc_ldflags = @TOR_LDFLAGS_libminiupnpc@
+miniupnpc_ldadd = -lminiupnpc -lm @TOR_LIB_IPHLPAPI@
+miniupnpc_cppflags = @TOR_CPPFLAGS_libminiupnpc@
+else
+miniupnpc_ldflags =
+miniupnpc_ldadd =
+miniupnpc_cppflags =
+endif
+
+src_tools_tor_fw_helper_tor_fw_helper_LDFLAGS = $(nat_pmp_ldflags) $(miniupnpc_ldflags)
+src_tools_tor_fw_helper_tor_fw_helper_LDADD = src/common/libor.a $(nat_pmp_ldadd) $(miniupnpc_ldadd) @TOR_LIB_WS32@
+src_tools_tor_fw_helper_tor_fw_helper_CPPFLAGS = $(nat_pmp_cppflags) $(miniupnpc_cppflags)