2007-06-13 01:48:24 +00:00
|
|
|
# This Jamfile requires boost-build v2 to build.
|
|
|
|
# The version shipped with boost 1.34.0
|
2004-02-18 00:08:20 +00:00
|
|
|
|
2004-02-04 20:20:53 +00:00
|
|
|
import modules ;
|
2011-07-23 19:46:27 +00:00
|
|
|
import path ;
|
2004-02-21 11:52:21 +00:00
|
|
|
import os ;
|
2005-01-11 02:13:07 +00:00
|
|
|
import errors ;
|
2006-08-31 00:26:41 +00:00
|
|
|
import feature : feature ;
|
2009-04-02 23:21:44 +00:00
|
|
|
import package ;
|
|
|
|
import virtual-target ;
|
2004-02-04 20:20:53 +00:00
|
|
|
|
|
|
|
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
|
2008-05-14 00:21:57 +00:00
|
|
|
CXXFLAGS = [ modules.peek : CXXFLAGS ] ;
|
|
|
|
LDFLAGS = [ modules.peek : LDFLAGS ] ;
|
2004-02-04 20:20:53 +00:00
|
|
|
|
2011-04-09 23:57:56 +00:00
|
|
|
ECHO "CXXFLAGS =" $(CXXFLAGS) ;
|
|
|
|
ECHO "LDFLAGS =" $(LDFLAGS) ;
|
2004-07-25 21:44:53 +00:00
|
|
|
ECHO "OS =" [ os.name ] ;
|
|
|
|
|
2007-07-07 21:27:36 +00:00
|
|
|
if $(BOOST_ROOT)
|
2005-01-11 02:13:07 +00:00
|
|
|
{
|
2015-08-08 19:18:05 -04:00
|
|
|
ECHO "building boost from source directory: " $(BOOST_ROOT) ;
|
|
|
|
|
2007-07-07 21:27:36 +00:00
|
|
|
use-project /boost : $(BOOST_ROOT) ;
|
2015-08-08 19:18:05 -04:00
|
|
|
alias boost_chrono : /boost/chrono//boost_chrono : : : <include>$(BOOST_ROOT) ;
|
|
|
|
alias boost_system : /boost/system//boost_system : : : <include>$(BOOST_ROOT) ;
|
|
|
|
alias boost_random : /boost/random//boost_random : : : <include>$(BOOST_ROOT) ;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
local boost-lib-search-path =
|
|
|
|
<search>/opt/local/lib
|
|
|
|
<search>/usr/lib
|
|
|
|
<search>/usr/local/lib
|
|
|
|
<search>/sw/lib
|
|
|
|
<search>/usr/g++/lib
|
|
|
|
;
|
|
|
|
|
|
|
|
local boost-include-path =
|
|
|
|
<include>/opt/local/include
|
|
|
|
<include>/usr/local/include
|
|
|
|
<include>/usr/sfw/include
|
|
|
|
;
|
|
|
|
|
|
|
|
# the names are decorated in MacPorts
|
|
|
|
lib boost_chrono : : <target-os>darwin <name>boost_chrono-mt $(boost-lib-search-path)
|
|
|
|
: : $(boost-include-path) ;
|
|
|
|
lib boost_system : : <target-os>darwin <name>boost_system-mt $(boost-lib-search-path)
|
|
|
|
: : $(boost-include-path) ;
|
|
|
|
lib boost_random : : <target-os>darwin <name>boost_random-mt $(boost-lib-search-path)
|
|
|
|
: : $(boost-include-path) ;
|
|
|
|
|
|
|
|
lib boost_chrono : : <name>boost_chrono $(boost-lib-search-path)
|
|
|
|
: : $(boost-include-path) ;
|
|
|
|
lib boost_system : : <name>boost_system $(boost-lib-search-path)
|
|
|
|
: : $(boost-include-path) ;
|
|
|
|
lib boost_random : : <name>boost_random $(boost-lib-search-path)
|
|
|
|
: : $(boost-include-path) ;
|
2005-01-11 02:13:07 +00:00
|
|
|
}
|
|
|
|
|
2014-07-06 19:18:00 +00:00
|
|
|
VERSION = 1.1.0 ;
|
2009-04-02 23:21:44 +00:00
|
|
|
|
2014-01-06 03:50:25 +00:00
|
|
|
rule coverage ( properties * )
|
|
|
|
{
|
|
|
|
local result ;
|
2015-02-13 02:58:21 +00:00
|
|
|
if <test-coverage>on in $(properties)
|
|
|
|
&& ( <toolset>gcc in $(properties)
|
2014-01-06 03:50:25 +00:00
|
|
|
|| <toolset>darwin in $(properties)
|
2015-02-13 02:58:21 +00:00
|
|
|
|| <toolset>clang in $(properties) )
|
2014-01-06 03:50:25 +00:00
|
|
|
{
|
|
|
|
result += <cxxflags>-fprofile-arcs <cxxflags>-ftest-coverage ;
|
|
|
|
|
|
|
|
if <toolset>gcc in $(properties)
|
|
|
|
{
|
|
|
|
result += <linkflags>-lgcov ;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
result += <linkflags>--coverage ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $(result) ;
|
|
|
|
}
|
|
|
|
|
2007-06-13 17:36:26 +00:00
|
|
|
# rule for linking the correct libraries depending
|
|
|
|
# on features and target-os
|
|
|
|
rule linking ( properties * )
|
2007-06-13 01:48:24 +00:00
|
|
|
{
|
|
|
|
local result ;
|
|
|
|
|
2007-06-13 17:36:26 +00:00
|
|
|
# openssl libraries, if enabled
|
2014-12-29 16:50:22 +00:00
|
|
|
if <crypto>openssl in $(properties)
|
2007-06-13 01:48:24 +00:00
|
|
|
{
|
2007-09-10 07:51:58 +00:00
|
|
|
# exclude gcc from a regular windows build to make mingw
|
|
|
|
# link against the regular unix library name
|
2012-01-19 08:12:13 +00:00
|
|
|
if <target-os>windows in $(properties)
|
2007-06-13 01:48:24 +00:00
|
|
|
{
|
2007-06-13 17:36:26 +00:00
|
|
|
result += <library>ssleay32
|
|
|
|
<library>libeay32
|
|
|
|
<library>advapi32
|
|
|
|
<library>user32
|
|
|
|
<library>shell32
|
2013-08-24 21:35:49 +00:00
|
|
|
<library>gdi32
|
2007-06-13 17:36:26 +00:00
|
|
|
;
|
2007-06-13 01:48:24 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-12-25 07:24:00 +00:00
|
|
|
result += <library>crypto <library>ssl <library>z ;
|
2007-06-13 01:48:24 +00:00
|
|
|
}
|
2010-12-25 07:24:00 +00:00
|
|
|
|
|
|
|
if <target-os>linux in $(properties)
|
|
|
|
{
|
|
|
|
# linker library on linux, required when using openssl
|
2011-02-14 04:12:26 +00:00
|
|
|
result += <library>dl ;
|
2010-12-25 07:24:00 +00:00
|
|
|
}
|
2007-06-13 01:48:24 +00:00
|
|
|
}
|
|
|
|
|
2015-08-07 21:28:51 -04:00
|
|
|
if <simulator>on in $(properties)
|
|
|
|
{
|
|
|
|
result += <library>/libsimulator//simulator ;
|
|
|
|
}
|
|
|
|
|
2012-08-16 03:03:29 +00:00
|
|
|
# dbghelp doesn't appear to exist in mingw
|
2012-01-26 10:33:39 +00:00
|
|
|
if <target-os>windows in $(properties)
|
2012-08-16 03:03:29 +00:00
|
|
|
&& ! <toolset>gcc in $(properties)
|
2013-06-17 16:11:52 +00:00
|
|
|
&& ( <variant>debug in $(properties)
|
|
|
|
|| <asserts>on in $(properties)
|
|
|
|
|| <asserts>production in $(properties)
|
2014-11-30 20:08:23 +00:00
|
|
|
|| <pool-allocators>debug in $(properties)
|
|
|
|
|| <allocator>debug in $(properties)
|
2012-01-26 10:33:39 +00:00
|
|
|
|| <asio-debugging>on in $(properties) )
|
|
|
|
{
|
|
|
|
result += <library>dbghelp ;
|
|
|
|
}
|
|
|
|
|
2009-11-08 03:09:19 +00:00
|
|
|
# gcrypt libraries, if enabled
|
2014-12-29 16:50:22 +00:00
|
|
|
if <crypto>gcrypt in $(properties)
|
2009-11-08 03:09:19 +00:00
|
|
|
{
|
|
|
|
# on mac os x, adding the /opt/local/include path
|
|
|
|
# would include openssl headers incompatible with
|
|
|
|
# the system library. Only add this include path
|
|
|
|
# if we're not using openssl (which we're most
|
|
|
|
# likely not if we're using libgcrypt)
|
|
|
|
result += <library>gcrypt <include>/opt/local/include ;
|
|
|
|
}
|
|
|
|
|
2007-06-13 17:36:26 +00:00
|
|
|
# socket functions on windows require winsock libraries
|
2007-08-20 04:58:56 +00:00
|
|
|
if <target-os>windows in $(properties)
|
|
|
|
|| <target-os>cygwin in $(properties)
|
2007-06-13 17:36:26 +00:00
|
|
|
{
|
|
|
|
result += <library>ws2_32
|
|
|
|
<library>wsock32
|
2010-11-29 01:33:05 +00:00
|
|
|
<library>iphlpapi
|
2007-06-13 17:36:26 +00:00
|
|
|
<define>WIN32_LEAN_AND_MEAN
|
|
|
|
<define>__USE_W32_SOCKETS
|
|
|
|
<define>WIN32
|
|
|
|
<define>_WIN32
|
|
|
|
;
|
2013-08-24 21:35:49 +00:00
|
|
|
|
|
|
|
# when DHT is enabled, we need ed25519 which in turn
|
|
|
|
# needs entropy
|
|
|
|
if ! <dht>off in $(properties)
|
|
|
|
{
|
|
|
|
result += <library>advapi32 ;
|
|
|
|
}
|
2007-06-13 17:36:26 +00:00
|
|
|
}
|
|
|
|
|
2009-12-09 09:55:19 +00:00
|
|
|
if <target-os>beos in $(properties)
|
|
|
|
{
|
2011-07-20 05:14:25 +00:00
|
|
|
result += <library>netkit <library>gcc ;
|
2009-12-09 09:55:19 +00:00
|
|
|
}
|
|
|
|
|
2009-01-27 08:24:48 +00:00
|
|
|
if <target-os>solaris in $(properties)
|
|
|
|
{
|
|
|
|
result += <library>libsocket <library>libnsl ;
|
|
|
|
}
|
|
|
|
|
2007-06-13 17:36:26 +00:00
|
|
|
# clock_gettime on linux requires librt
|
2015-04-04 18:03:55 +00:00
|
|
|
if <target-os>linux in $(properties)
|
2007-06-13 17:36:26 +00:00
|
|
|
{
|
2008-05-09 17:07:08 +00:00
|
|
|
result += <library>librt ;
|
2007-06-13 17:36:26 +00:00
|
|
|
}
|
|
|
|
|
2011-02-09 09:54:45 +00:00
|
|
|
if <iconv>on in $(properties)
|
|
|
|
{
|
|
|
|
result += <library>libiconv ;
|
|
|
|
}
|
|
|
|
|
2015-06-20 16:36:23 -04:00
|
|
|
if ( <toolset>gcc in $(properties)
|
|
|
|
|| <toolset>clang in $(properties) )
|
2007-08-20 04:58:56 +00:00
|
|
|
&& <target-os>linux in $(properties)
|
2013-06-17 16:11:52 +00:00
|
|
|
&& ( <variant>debug in $(properties)
|
2012-04-20 17:03:00 +00:00
|
|
|
|| <asserts>on in $(properties)
|
2013-06-17 16:11:52 +00:00
|
|
|
|| <asserts>production in $(properties)
|
2014-12-01 10:43:34 +00:00
|
|
|
|| <pool-allocators>debug in $(properties)
|
|
|
|
|| <allocator>debug in $(properties)
|
2013-06-17 16:11:52 +00:00
|
|
|
|| <asio-debugging>on in $(properties) )
|
2007-08-20 04:58:56 +00:00
|
|
|
{
|
|
|
|
# for backtraces in assertion failures
|
|
|
|
# which only works on ELF targets with gcc
|
2015-06-20 16:36:23 -04:00
|
|
|
result += <linkflags>-export-dynamic <linkflags>-rdynamic ;
|
2007-08-20 04:58:56 +00:00
|
|
|
}
|
|
|
|
|
2015-08-08 19:18:05 -04:00
|
|
|
if <boost-link>static in $(properties)
|
2007-07-07 21:27:36 +00:00
|
|
|
{
|
2015-08-08 19:18:05 -04:00
|
|
|
if <link>shared in $(properties)
|
2008-06-28 08:59:25 +00:00
|
|
|
{
|
2015-08-08 19:18:05 -04:00
|
|
|
# if libtorrent is being built as a shared library
|
|
|
|
# but we're linking against boost statically, we still
|
|
|
|
# need to make boost think it's being built as a shared
|
|
|
|
# library, so that it properly exports its symbols
|
|
|
|
result += <define>BOOST_ALL_DYN_LINK ;
|
|
|
|
result += <library>boost_system/<link>static/<define>BOOST_ALL_DYN_LINK ;
|
|
|
|
result += <library>boost_chrono/<link>static/<define>BOOST_ALL_DYN_LINK ;
|
|
|
|
result += <library>boost_random/<link>static/<define>BOOST_ALL_DYN_LINK ;
|
2008-06-28 08:59:25 +00:00
|
|
|
}
|
|
|
|
else
|
2015-06-07 08:31:09 +03:00
|
|
|
{
|
|
|
|
result += <library>boost_system/<link>static ;
|
|
|
|
result += <library>boost_chrono/<link>static ;
|
|
|
|
result += <library>boost_random/<link>static ;
|
|
|
|
}
|
2015-08-08 19:18:05 -04:00
|
|
|
|
|
|
|
if <toolset>gcc in $(properties)
|
|
|
|
&& ! <target-os>windows in $(properties)
|
|
|
|
&& <link>shared in $(properties)
|
2015-06-07 08:31:09 +03:00
|
|
|
{
|
2015-08-08 19:18:05 -04:00
|
|
|
result += <fpic>on ;
|
2015-06-07 08:31:09 +03:00
|
|
|
}
|
2012-07-23 16:10:34 +00:00
|
|
|
|
2008-06-07 17:36:33 +00:00
|
|
|
}
|
2015-08-08 19:30:01 -04:00
|
|
|
else if <boost-link>shared in $(properties)
|
2015-08-08 19:18:05 -04:00
|
|
|
{
|
|
|
|
result += <library>boost_system/<link>shared ;
|
|
|
|
result += <library>boost_chrono/<link>shared ;
|
|
|
|
result += <library>boost_random/<link>shared ;
|
|
|
|
}
|
2015-08-08 19:30:01 -04:00
|
|
|
else
|
|
|
|
{
|
|
|
|
result += <library>boost_system ;
|
|
|
|
result += <library>boost_chrono ;
|
|
|
|
result += <library>boost_random ;
|
|
|
|
}
|
|
|
|
|
2015-08-08 19:18:05 -04:00
|
|
|
result += <define>BOOST_ALL_NO_LIB
|
|
|
|
<define>BOOST_MULTI_INDEX_DISABLE_SERIALIZATION
|
|
|
|
;
|
2008-06-07 17:36:33 +00:00
|
|
|
|
2007-06-13 01:48:24 +00:00
|
|
|
return $(result) ;
|
|
|
|
}
|
|
|
|
|
2015-04-18 02:33:39 +00:00
|
|
|
rule warnings ( properties * )
|
|
|
|
{
|
|
|
|
local result ;
|
2015-04-26 00:51:44 +00:00
|
|
|
|
|
|
|
if <warnings>off in $(properties)
|
|
|
|
{
|
|
|
|
return $(result) ;
|
|
|
|
}
|
|
|
|
|
2015-04-18 02:33:39 +00:00
|
|
|
if <toolset>clang in $(properties)
|
|
|
|
|| <toolset>darwin in $(properties)
|
|
|
|
{
|
|
|
|
result += <cflags>-Weverything ;
|
|
|
|
result += <cflags>-Wno-documentation ;
|
2015-08-21 00:26:11 +02:00
|
|
|
result += <cxxflags>-Wno-c++98-compat-pedantic ;
|
2015-04-18 02:33:39 +00:00
|
|
|
result += <cflags>-Wno-padded ;
|
|
|
|
result += <cflags>-Wno-global-constructors ;
|
2015-08-21 00:26:11 +02:00
|
|
|
result += <cxxflags>-Wno-c++98-compat ;
|
2015-04-18 02:33:39 +00:00
|
|
|
result += <cflags>-Wno-exit-time-destructors ;
|
|
|
|
result += <cflags>-Wno-documentation-unknown-command ;
|
|
|
|
result += <cflags>-Wno-disabled-macro-expansion ;
|
2015-09-02 01:30:40 -04:00
|
|
|
result += <cflags>-Wno-unused-command-line-argument ;
|
|
|
|
result += <cflags>-Wno-error=implicit-fallthrough ;
|
|
|
|
result += <cflags>-Wno-c++11-long-long ;
|
|
|
|
result += <cflags>-Wno-variadic-macros ;
|
2015-04-20 04:52:49 +00:00
|
|
|
|
2015-05-16 18:35:47 +00:00
|
|
|
# in C++98 mode there's no way to silence this warning
|
|
|
|
# in the code (without final)
|
|
|
|
result += <cflags>-Wno-non-virtual-dtor ;
|
|
|
|
|
2015-08-20 01:33:20 +02:00
|
|
|
# enable these warnings again, once the other ones are dealt with
|
2015-04-19 06:28:21 +00:00
|
|
|
result += <cflags>-Wno-weak-vtables ;
|
2015-04-20 04:52:49 +00:00
|
|
|
result += <cflags>-Wno-sign-compare ;
|
|
|
|
result += <cflags>-Wno-sign-conversion ;
|
2015-08-01 19:55:28 -04:00
|
|
|
result += <cflags>-Wno-conversion ;
|
2015-04-18 02:33:39 +00:00
|
|
|
}
|
|
|
|
|
2015-04-18 14:33:55 +00:00
|
|
|
if <toolset>gcc in $(properties)
|
|
|
|
{
|
|
|
|
result += <cflags>-Wall ;
|
|
|
|
result += <cflags>-Wextra ;
|
2015-08-20 01:33:20 +02:00
|
|
|
result += <cflags>-Wpedantic ;
|
|
|
|
# result += <cflags>-Wmisleading-indentation ;
|
|
|
|
result += <cflags>-Wparentheses ;
|
|
|
|
result += <cflags>-Wvla ;
|
2015-08-21 00:26:11 +02:00
|
|
|
result += <cxxflags>-Wc++11-compat ;
|
2015-09-06 17:29:01 -04:00
|
|
|
result += <cflags>-Wno-format-zero-length ;
|
|
|
|
result += <cflags>-Wno-long-long ;
|
2015-08-08 13:08:41 -04:00
|
|
|
|
2015-04-25 04:22:51 +00:00
|
|
|
# enable these warnings again, once the other ones are dealt with
|
|
|
|
result += <cflags>-Wno-sign-compare ;
|
2015-08-20 01:33:20 +02:00
|
|
|
result += <cflags>-Wno-unused-variable ;
|
2015-04-18 14:33:55 +00:00
|
|
|
}
|
|
|
|
|
2015-04-18 02:33:39 +00:00
|
|
|
if <toolset>msvc in $(properties)
|
|
|
|
{
|
|
|
|
# disable warning C4503: decorated name length exceeded, name was truncated
|
|
|
|
result += <cflags>/wd4503 ;
|
2015-04-27 02:21:12 +00:00
|
|
|
result += <warnings>all ;
|
|
|
|
|
|
|
|
# enable these warnings again, once the other ones are dealt with
|
|
|
|
|
|
|
|
# disable warning C4389: signed/unsigned mismatch
|
|
|
|
result += <cflags>/wd4389 ;
|
|
|
|
result += <cflags>/wd4245 ;
|
2015-04-27 03:19:10 +00:00
|
|
|
result += <cflags>/wd4018 ;
|
2015-04-27 02:21:12 +00:00
|
|
|
# disable warning C4244: 'argument' : conversion from 'int' to 'unsigned short', possible loss of data
|
|
|
|
result += <cflags>/wd4244 ;
|
2015-04-18 02:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return $(result) ;
|
|
|
|
}
|
|
|
|
|
2007-06-13 17:36:26 +00:00
|
|
|
# rule for adding the right source files
|
|
|
|
# depending on target-os and features
|
|
|
|
rule building ( properties * )
|
2007-06-13 01:48:24 +00:00
|
|
|
{
|
|
|
|
local result ;
|
|
|
|
|
2012-03-18 23:31:04 +00:00
|
|
|
if <link>shared in $(properties) && <export-extra>on in $(properties)
|
|
|
|
{
|
|
|
|
# export some internal libtorrent functions
|
|
|
|
# in order to me able to unit test them.
|
|
|
|
# this is off by default to keep the export
|
|
|
|
# symbol table reasonably small
|
|
|
|
result += <define>TORRENT_EXPORT_EXTRA ;
|
|
|
|
}
|
|
|
|
|
2015-08-20 20:56:52 +02:00
|
|
|
if <toolset>msvc in $(properties)
|
|
|
|
{
|
|
|
|
# allow larger .obj files (with more sections)
|
|
|
|
result += <cflags>/bigobj ;
|
|
|
|
}
|
|
|
|
|
2014-01-13 06:49:47 +00:00
|
|
|
if ( <variant>debug in $(properties)
|
|
|
|
&& ( <toolset>clang in $(properties)
|
|
|
|
|| <toolset>gcc in $(properties)
|
|
|
|
|| <toolset>darwin in $(properties) ) )
|
|
|
|
{
|
|
|
|
result += <cflags>-ftrapv ;
|
|
|
|
}
|
|
|
|
|
2012-01-26 10:33:39 +00:00
|
|
|
if ( <variant>debug in $(properties)
|
|
|
|
|| <asserts>on in $(properties) )
|
2007-09-01 04:08:39 +00:00
|
|
|
{
|
|
|
|
result += <source>src/assert.cpp ;
|
|
|
|
}
|
|
|
|
|
2014-12-29 16:50:22 +00:00
|
|
|
if <encryption>on in $(properties)
|
2012-03-15 06:08:08 +00:00
|
|
|
{
|
|
|
|
result += <source>src/mpi.c ;
|
2014-12-29 16:50:22 +00:00
|
|
|
result += <source>src/pe_crypto.cpp ;
|
2012-03-15 06:08:08 +00:00
|
|
|
}
|
|
|
|
|
2014-12-29 16:50:22 +00:00
|
|
|
if <crypo>built-in in $(properties)
|
2007-06-13 01:48:24 +00:00
|
|
|
{
|
|
|
|
result += <source>src/sha1.cpp ;
|
|
|
|
}
|
2009-11-09 07:26:40 +00:00
|
|
|
|
2012-03-15 06:08:08 +00:00
|
|
|
if ( <toolset>darwin in $(properties)
|
|
|
|
|| <toolset>gcc in $(properties)
|
2013-04-27 19:35:41 +00:00
|
|
|
|| <toolset>clang in $(propertoes)
|
|
|
|
|| <toolset>clang-darwin in $(propertoes) )
|
2012-03-15 06:08:08 +00:00
|
|
|
&& <link>shared in $(properties)
|
2012-03-21 16:34:41 +00:00
|
|
|
# on GCC, enabling debugging in libstdc++
|
|
|
|
# breaks the ABI and its ability to appear
|
|
|
|
# in shared object interfaces, so when it's
|
|
|
|
# enabled, just export everything (since we're)
|
|
|
|
# probably not a production build anyway
|
2012-12-15 05:09:11 +00:00
|
|
|
&& ! <debug-iterators>on in $(properties)
|
2012-03-15 06:08:08 +00:00
|
|
|
{
|
|
|
|
# hide non-external symbols
|
2012-03-18 23:31:04 +00:00
|
|
|
result += <cflags>-fvisibility=hidden ;
|
2012-03-15 06:08:08 +00:00
|
|
|
result += <cxxflags>-fvisibility-inlines-hidden ;
|
2013-09-04 01:16:13 +00:00
|
|
|
|
|
|
|
if ( <toolset>gcc in $(properties) )
|
|
|
|
{
|
|
|
|
result += <linkflags>-Wl,-Bsymbolic ;
|
|
|
|
}
|
2012-03-15 06:08:08 +00:00
|
|
|
}
|
|
|
|
|
2007-06-13 01:48:24 +00:00
|
|
|
return $(result) ;
|
|
|
|
}
|
2004-03-17 12:14:44 +00:00
|
|
|
|
2009-04-02 23:21:44 +00:00
|
|
|
rule tag ( name : type ? : property-set )
|
|
|
|
{
|
|
|
|
name = [ virtual-target.add-prefix-and-suffix $(name) : $(type) : $(property-set) ] ;
|
|
|
|
|
|
|
|
if $(type) = SHARED_LIB &&
|
|
|
|
( ! ( [ $(property-set).get <target-os> ] in windows cygwin ) )
|
|
|
|
{
|
|
|
|
name = $(name).$(VERSION) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $(name) ;
|
|
|
|
}
|
|
|
|
|
2009-11-27 18:46:29 +00:00
|
|
|
feature ipv6 : on off : composite propagated link-incompatible ;
|
|
|
|
feature.compose <ipv6>off : <define>TORRENT_USE_IPV6=0 ;
|
|
|
|
|
2015-03-16 05:49:26 +00:00
|
|
|
feature sanitize : off address bounds undefined thread rtc : composite propagated link-incompatible ;
|
2014-02-03 03:23:17 +00:00
|
|
|
# sanitize is a clang and GCC feature
|
2014-12-17 02:45:32 +00:00
|
|
|
feature.compose <sanitize>bounds : <cflags>-fsanitize=bounds <cflags>-fsanitize-undefined-trap-on-error <linkflags>-fsanitize=bounds <linkflags>-fsanitize-undefined-trap-on-error ;
|
2014-02-01 21:46:31 +00:00
|
|
|
feature.compose <sanitize>undefined : <cflags>-fsanitize=undefined <linkflags>-fsanitize=undefined ;
|
|
|
|
feature.compose <sanitize>thread : <cflags>-fsanitize=thread <linkflags>-fsanitize=thread ;
|
2015-03-16 05:49:26 +00:00
|
|
|
feature.compose <sanitize>address : <cflags>-fsanitize=address <linkflags>-fsanitize=address ;
|
2014-02-03 03:23:17 +00:00
|
|
|
# RTC (runtime check) is an msvc feature
|
|
|
|
feature.compose <sanitize>rtc : <cflags>/RTCc <cflags>/RTCsu ;
|
2014-02-01 21:46:31 +00:00
|
|
|
|
2010-04-11 00:55:15 +00:00
|
|
|
feature fiemap : off on : composite propagated ;
|
|
|
|
feature.compose <fiemap>on : <define>HAVE_LINUX_FIEMAP_H ;
|
|
|
|
|
2014-07-06 19:18:00 +00:00
|
|
|
feature file-leak-logging : off on : composite propagated ;
|
|
|
|
feature.compose <file-leak-logging>on : <define>TORRENT_DEBUG_FILE_LEAKS=1 ;
|
|
|
|
|
2012-07-31 16:53:37 +00:00
|
|
|
feature i2p : on off : composite propagated ;
|
|
|
|
feature.compose <i2p>on : <define>TORRENT_USE_I2P=1 ;
|
|
|
|
feature.compose <i2p>off : <define>TORRENT_USE_I2P=0 ;
|
|
|
|
|
2011-02-09 09:54:45 +00:00
|
|
|
feature iconv : auto on off : composite propagated ;
|
|
|
|
feature.compose <iconv>on : <define>TORRENT_USE_ICONV=1 ;
|
|
|
|
feature.compose <iconv>off : <define>TORRENT_USE_ICONV=0 ;
|
|
|
|
|
2014-11-09 11:17:13 +00:00
|
|
|
feature use-valgrind : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <use-valgrind>on : <define>TORRENT_USE_VALGRIND=1 ;
|
2013-10-02 21:51:30 +00:00
|
|
|
|
2014-07-06 19:18:00 +00:00
|
|
|
feature memory-optimization : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <memory-optimization>on : <define>TORRENT_OPTIMIZE_MEMORY_USAGE ;
|
|
|
|
|
2011-05-07 19:58:38 +00:00
|
|
|
feature asserts : auto on off production system : composite propagated ;
|
|
|
|
feature.compose <asserts>on : <define>TORRENT_RELEASE_ASSERTS=1 ;
|
2011-08-14 23:30:40 +00:00
|
|
|
feature.compose <asserts>production : <define>TORRENT_PRODUCTION_ASSERTS=1 <define>TORRENT_RELEASE_ASSERTS=1 ;
|
2014-01-19 19:45:50 +00:00
|
|
|
feature.compose <asserts>off : <define>TORRENT_USE_ASSERTS=0 ;
|
2011-02-24 18:15:15 +00:00
|
|
|
feature.compose <asserts>system : <define>TORRENT_USE_SYSTEM_ASSERTS=1 ;
|
2010-05-06 02:18:08 +00:00
|
|
|
|
2015-07-29 14:56:31 -04:00
|
|
|
feature windows-version : vista win7 xp : composite propagated link-incompatible ;
|
2010-12-01 05:47:18 +00:00
|
|
|
feature.compose <windows-version>vista : <define>_WIN32_WINNT=0x0600 ;
|
|
|
|
feature.compose <windows-version>win7 : <define>_WIN32_WINNT=0x0601 ;
|
2015-07-29 14:56:31 -04:00
|
|
|
feature.compose <windows-version>xp : <define>_WIN32_WINNT=0x0501 ;
|
2010-12-01 05:47:18 +00:00
|
|
|
|
2013-04-09 02:38:11 +00:00
|
|
|
feature extensions : on off : composite propagated link-incompatible ;
|
2013-12-20 06:38:51 +00:00
|
|
|
feature.compose <extensions>off : <define>TORRENT_DISABLE_EXTENSIONS ;
|
2013-04-09 02:38:11 +00:00
|
|
|
|
2010-11-28 01:47:30 +00:00
|
|
|
feature asio-debugging : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <asio-debugging>on : <define>TORRENT_ASIO_DEBUGGING ;
|
|
|
|
|
2014-07-06 19:18:00 +00:00
|
|
|
feature picker-debugging : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <picker-debugging>on : <define>TORRENT_DEBUG_REFCOUNTS ;
|
|
|
|
|
2015-08-07 21:28:51 -04:00
|
|
|
feature simulator : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <simulator>on : <define>TORRENT_BUILD_SIMULATOR ;
|
|
|
|
|
2013-11-29 09:41:53 +00:00
|
|
|
# deprecated use allocator=pool instead
|
2014-07-06 19:18:00 +00:00
|
|
|
feature pool-allocators : on off debug : composite propagated link-incompatible ;
|
2008-04-09 05:19:11 +00:00
|
|
|
feature.compose <pool-allocators>off : <define>TORRENT_DISABLE_POOL_ALLOCATOR ;
|
2014-07-06 19:18:00 +00:00
|
|
|
feature.compose <pool-allocators>debug : <define>TORRENT_DISABLE_POOL_ALLOCATOR <define>TORRENT_DEBUG_BUFFERS ;
|
2008-04-09 05:19:11 +00:00
|
|
|
|
2014-01-06 03:50:25 +00:00
|
|
|
feature allocator : pool system debug : composite propagated ;
|
2013-11-29 09:41:53 +00:00
|
|
|
feature.compose <allocator>system : <define>TORRENT_DISABLE_POOL_ALLOCATOR ;
|
|
|
|
feature.compose <allocator>debug : <define>TORRENT_DISABLE_POOL_ALLOCATOR <define>TORRENT_DEBUG_BUFFERS ;
|
|
|
|
|
2010-03-07 01:10:08 +00:00
|
|
|
feature piece-allocator : valloc memalign posix_memalign : composite propagated ;
|
|
|
|
feature.compose <piece-allocator>memalign : <define>TORRENT_USE_MEMALIGN=1 ;
|
|
|
|
feature.compose <piece-allocator>posix_memalign : <define>TORRENT_USE_POSIX_MEMALIGN=1 ;
|
|
|
|
|
2008-07-12 17:51:59 +00:00
|
|
|
feature invariant-checks : on off full : composite propagated link-incompatible ;
|
2008-01-13 06:17:56 +00:00
|
|
|
feature.compose <invariant-checks>off : <define>TORRENT_DISABLE_INVARIANT_CHECKS ;
|
2008-07-12 17:51:59 +00:00
|
|
|
feature.compose <invariant-checks>full : <define>TORRENT_EXPENSIVE_INVARIANT_CHECKS ;
|
2008-01-13 06:17:56 +00:00
|
|
|
|
2007-09-25 20:36:02 +00:00
|
|
|
feature disk-stats : off on : composite propagated link-incompatible ;
|
2007-09-17 08:15:54 +00:00
|
|
|
feature.compose <disk-stats>on : <define>TORRENT_DISK_STATS ;
|
|
|
|
|
2015-08-12 21:36:20 -04:00
|
|
|
feature utp-log : off on : composite propagated link-incompatible ;
|
2015-08-12 23:00:28 -04:00
|
|
|
feature.compose <utp-log>on : <define>TORRENT_UTP_LOG_ENABLE ;
|
2015-08-12 20:55:07 -04:00
|
|
|
|
2009-09-05 07:21:10 +00:00
|
|
|
feature simulate-slow-read : off on : composite propagated ;
|
|
|
|
feature.compose <simulate-slow-read>on : <define>TORRENT_SIMULATE_SLOW_READ ;
|
|
|
|
|
2015-04-17 01:15:33 +00:00
|
|
|
feature logging : on off : composite propagated link-incompatible ;
|
|
|
|
feature.compose <logging>off : <define>TORRENT_DISABLE_LOGGING ;
|
2004-10-31 23:16:08 +00:00
|
|
|
|
2015-05-16 19:29:49 +00:00
|
|
|
feature dht : on off : composite propagated link-incompatible ;
|
2013-04-09 01:04:43 +00:00
|
|
|
feature.compose <dht>off : <define>TORRENT_DISABLE_DHT ;
|
2004-02-04 11:00:29 +00:00
|
|
|
|
2014-12-29 16:50:22 +00:00
|
|
|
feature encryption : on off : composite propagated link-incompatible ;
|
2009-11-08 03:09:19 +00:00
|
|
|
feature.compose <encryption>off : <define>TORRENT_DISABLE_ENCRYPTION ;
|
2007-04-15 04:30:52 +00:00
|
|
|
|
2015-03-21 00:12:40 +00:00
|
|
|
feature mutable-torrents : on off : composite propagated link-incompatible ;
|
|
|
|
feature.compose <mutable-torrents>off : <define>TORRENT_DISABLE_MUTABLE_TORRENTS ;
|
|
|
|
|
2015-01-04 01:04:56 +00:00
|
|
|
feature crypto : built-in openssl gcrypt : composite propagated ;
|
2014-12-29 16:50:22 +00:00
|
|
|
feature.compose <crypto>openssl : <define>TORRENT_USE_OPENSSL ;
|
|
|
|
feature.compose <crypto>gcrypt : <define>TORRENT_USE_GCRYPT ;
|
|
|
|
|
2007-09-25 20:36:02 +00:00
|
|
|
feature resolve-countries : on off : composite propagated link-incompatible ;
|
2007-05-02 19:47:38 +00:00
|
|
|
feature.compose <resolve-countries>off : <define>TORRENT_DISABLE_RESOLVE_COUNTRIES ;
|
|
|
|
|
2008-07-20 11:53:21 +00:00
|
|
|
feature character-set : unicode ansi : composite propagated link-incompatible ;
|
2007-04-18 19:12:30 +00:00
|
|
|
feature.compose <character-set>unicode : <define>_UNICODE <define>UNICODE ;
|
|
|
|
|
2008-08-03 15:14:08 +00:00
|
|
|
feature deprecated-functions : on off : composite propagated link-incompatible ;
|
|
|
|
feature.compose <deprecated-functions>off : <define>TORRENT_NO_DEPRECATE ;
|
|
|
|
|
2015-08-08 19:30:01 -04:00
|
|
|
feature boost-link : default static shared : propagated composite ;
|
2007-07-07 21:27:36 +00:00
|
|
|
|
2007-08-03 06:13:26 +00:00
|
|
|
feature debug-iterators : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <debug-iterators>on : <define>_SCL_SECURE=1 <define>_GLIBCXX_DEBUG ;
|
|
|
|
|
2015-02-10 04:00:44 +00:00
|
|
|
feature test-coverage : off on : composite propagated link-incompatible ;
|
2007-08-21 17:43:19 +00:00
|
|
|
|
2008-12-20 23:30:53 +00:00
|
|
|
feature fpic : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <fpic>on : <cflags>-fPIC ;
|
2008-12-21 02:38:37 +00:00
|
|
|
feature.compose <fpic>off : <toolset>darwin:<cflags>-mdynamic-no-pic ;
|
2008-12-20 23:30:53 +00:00
|
|
|
|
2014-07-06 19:18:00 +00:00
|
|
|
feature profile-calls : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <profile-calls>on : <define>TORRENT_PROFILE_CALLS=1 ;
|
|
|
|
|
2012-03-18 23:31:04 +00:00
|
|
|
# controls whether or not to export some internal
|
|
|
|
# libtorrent functions. Used for unit testing
|
|
|
|
feature export-extra : off on : composite propagated ;
|
|
|
|
|
2014-11-30 10:07:19 +00:00
|
|
|
|
|
|
|
# this is a trick to get filename paths to targets to become shorter
|
|
|
|
# making it possible to build on windows, especially mingw seems particular
|
2015-07-06 17:33:17 -04:00
|
|
|
# for release builds, disable optimizations as they bump GCC over the edge of
|
|
|
|
# allowed memory usage on travis-ci
|
2015-08-01 19:55:28 -04:00
|
|
|
variant test_release : release
|
|
|
|
: <asserts>production <debug-symbols>on
|
2015-07-06 17:33:17 -04:00
|
|
|
<invariant-checks>full <boost-link>shared <optimization>off
|
2015-06-05 00:15:22 -04:00
|
|
|
<export-extra>on <debug-iterators>on <threading>multi
|
2014-11-30 10:07:19 +00:00
|
|
|
;
|
|
|
|
variant test_debug : debug
|
2014-12-29 16:50:22 +00:00
|
|
|
: <crypto>openssl <logging>on <disk-stats>on
|
2015-05-16 19:29:49 +00:00
|
|
|
<allocator>debug <debug-iterators>on
|
2014-11-30 10:07:19 +00:00
|
|
|
<invariant-checks>full <boost-link>shared
|
2015-06-05 00:15:22 -04:00
|
|
|
<export-extra>on <debug-iterators>on <threading>multi
|
2014-11-30 10:07:19 +00:00
|
|
|
;
|
|
|
|
variant test_barebones : debug
|
2014-12-09 09:08:26 +00:00
|
|
|
: <ipv6>off <dht>off <extensions>off <logging>off <boost-link>shared
|
2014-11-30 10:07:19 +00:00
|
|
|
<deprecated-functions>off <invariant-checks>off
|
2015-06-05 00:15:22 -04:00
|
|
|
<export-extra>on <debug-iterators>on <threading>multi
|
2014-11-30 10:07:19 +00:00
|
|
|
;
|
|
|
|
|
2007-06-13 17:36:26 +00:00
|
|
|
# required for openssl on windows
|
|
|
|
lib ssleay32 : : <name>ssleay32 ;
|
|
|
|
lib libeay32 : : <name>libeay32 ;
|
|
|
|
lib advapi32 : : <name>Advapi32 ;
|
|
|
|
lib user32 : : <name>User32 ;
|
|
|
|
lib shell32 : : <name>shell32 ;
|
|
|
|
lib gdi32 : : <name>gdi32 ;
|
2012-01-26 10:33:39 +00:00
|
|
|
lib dbghelp : : <name>dbghelp ;
|
2007-06-13 17:36:26 +00:00
|
|
|
|
2009-12-09 09:55:19 +00:00
|
|
|
# required for networking on beos
|
|
|
|
lib netkit : : <name>net <search>/boot/system/lib <link>shared ;
|
2011-07-20 05:14:25 +00:00
|
|
|
lib gcc : : <name>gcc <link>static ;
|
2009-12-09 09:55:19 +00:00
|
|
|
|
2011-02-09 09:54:45 +00:00
|
|
|
# when using iconv
|
2012-05-13 04:40:21 +00:00
|
|
|
lib libiconv : : <name>iconv <link>shared <search>/usr/local/lib ;
|
2011-02-09 09:54:45 +00:00
|
|
|
|
2007-06-13 17:36:26 +00:00
|
|
|
# openssl on linux/bsd/macos etc.
|
2009-11-08 03:09:19 +00:00
|
|
|
lib gcrypt : : <name>gcrypt <link>shared <search>/opt/local/lib ;
|
2013-09-01 17:39:40 +00:00
|
|
|
lib z : : <link>shared <name>z <search>/usr/lib ;
|
2015-04-04 18:03:55 +00:00
|
|
|
lib crypto : : <name>crypto <link>shared <search>/usr/lib <use>z ;
|
2012-01-14 16:04:25 +00:00
|
|
|
lib ssl : : <name>ssl <link>shared <use>crypto <search>/opt/local/lib ;
|
2011-02-14 04:12:26 +00:00
|
|
|
lib dl : : <link>shared <name>dl ;
|
2007-06-13 17:36:26 +00:00
|
|
|
|
|
|
|
# time functions used on linux require librt
|
2009-11-02 01:10:05 +00:00
|
|
|
lib librt : : <name>rt <link>shared ;
|
2007-06-13 17:36:26 +00:00
|
|
|
|
2009-11-02 01:10:05 +00:00
|
|
|
lib libsocket : : <use>libnsl <name>socket <link>shared <search>/usr/sfw/lib <link>shared ;
|
|
|
|
lib libnsl : : <name>nsl <link>shared <search>/usr/sfw/lib <link>shared ;
|
2009-01-27 08:24:48 +00:00
|
|
|
|
2007-06-13 17:36:26 +00:00
|
|
|
# socket libraries on windows
|
2009-11-02 01:10:05 +00:00
|
|
|
lib wsock32 : : <name>wsock32 <link>shared ;
|
|
|
|
lib ws2_32 : : <name>ws2_32 <link>shared ;
|
2010-11-29 01:33:05 +00:00
|
|
|
lib iphlpapi : : <name>iphlpapi <link>shared ;
|
2007-06-13 17:36:26 +00:00
|
|
|
|
2003-10-22 23:00:57 +00:00
|
|
|
SOURCES =
|
2007-04-17 00:23:46 +00:00
|
|
|
alert
|
2013-04-09 02:38:11 +00:00
|
|
|
alert_manager
|
2009-01-15 17:09:36 +00:00
|
|
|
allocator
|
2007-12-30 23:30:14 +00:00
|
|
|
assert
|
2009-09-16 04:41:35 +00:00
|
|
|
bandwidth_limit
|
|
|
|
bandwidth_manager
|
|
|
|
bandwidth_queue_entry
|
2015-03-12 05:20:12 +00:00
|
|
|
bdecode
|
2014-07-06 19:18:00 +00:00
|
|
|
block_cache
|
2010-12-24 01:31:41 +00:00
|
|
|
bloom_filter
|
2011-08-13 23:01:38 +00:00
|
|
|
chained_buffer
|
2014-10-22 22:06:56 +00:00
|
|
|
choker
|
2015-02-28 19:51:15 +00:00
|
|
|
close_reason
|
2015-04-26 18:46:45 +00:00
|
|
|
cpuid
|
2014-07-06 19:18:00 +00:00
|
|
|
crc32c
|
2008-05-14 05:29:42 +00:00
|
|
|
create_torrent
|
2008-04-10 10:03:23 +00:00
|
|
|
disk_buffer_holder
|
2014-07-06 19:18:00 +00:00
|
|
|
disk_buffer_pool
|
|
|
|
disk_io_job
|
|
|
|
disk_job_pool
|
2007-04-17 00:23:46 +00:00
|
|
|
entry
|
2008-07-18 10:22:16 +00:00
|
|
|
error_code
|
2008-05-28 08:44:40 +00:00
|
|
|
file_storage
|
2008-04-11 03:41:09 +00:00
|
|
|
lazy_bdecode
|
2007-04-17 00:23:46 +00:00
|
|
|
escape_string
|
2012-08-26 15:26:17 +00:00
|
|
|
string_util
|
2008-07-20 11:14:54 +00:00
|
|
|
file
|
2008-01-30 18:32:13 +00:00
|
|
|
gzip
|
2013-05-08 07:57:16 +00:00
|
|
|
hasher
|
2015-04-21 00:23:00 +00:00
|
|
|
hex
|
2007-04-17 00:23:46 +00:00
|
|
|
http_connection
|
2007-04-25 18:26:35 +00:00
|
|
|
http_stream
|
2008-01-12 09:36:03 +00:00
|
|
|
http_parser
|
2007-04-17 00:23:46 +00:00
|
|
|
identify_client
|
|
|
|
ip_filter
|
2013-01-01 23:12:16 +00:00
|
|
|
ip_voter
|
2015-04-24 06:06:41 +00:00
|
|
|
merkle
|
2007-04-17 00:23:46 +00:00
|
|
|
peer_connection
|
2014-07-06 19:18:00 +00:00
|
|
|
platform_util
|
2007-04-17 00:23:46 +00:00
|
|
|
bt_peer_connection
|
2010-10-10 18:43:58 +00:00
|
|
|
web_connection_base
|
2007-04-17 00:23:46 +00:00
|
|
|
web_peer_connection
|
2008-12-30 03:54:07 +00:00
|
|
|
http_seed_connection
|
2015-07-01 21:13:26 -07:00
|
|
|
peer_connection_handle
|
2009-08-20 03:19:12 +00:00
|
|
|
i2p_stream
|
2007-04-25 18:26:35 +00:00
|
|
|
instantiate_connection
|
2007-04-17 00:23:46 +00:00
|
|
|
natpmp
|
2010-11-29 01:33:05 +00:00
|
|
|
packet_buffer
|
2007-04-17 00:23:46 +00:00
|
|
|
piece_picker
|
2014-10-26 07:34:31 +00:00
|
|
|
peer_list
|
2014-07-06 19:18:00 +00:00
|
|
|
proxy_base
|
2010-03-16 06:14:22 +00:00
|
|
|
puff
|
2011-02-26 07:55:51 +00:00
|
|
|
random
|
2014-11-23 06:14:47 +00:00
|
|
|
receive_buffer
|
2015-03-21 00:12:40 +00:00
|
|
|
resolve_links
|
2011-01-18 03:41:54 +00:00
|
|
|
rss
|
2007-04-17 00:23:46 +00:00
|
|
|
session
|
2015-06-28 14:12:27 -07:00
|
|
|
session_handle
|
2007-04-17 00:23:46 +00:00
|
|
|
session_impl
|
2014-08-26 04:51:09 +00:00
|
|
|
session_call
|
2014-07-06 19:18:00 +00:00
|
|
|
settings_pack
|
2009-09-16 03:46:36 +00:00
|
|
|
socket_io
|
2009-11-23 08:38:50 +00:00
|
|
|
socket_type
|
2007-04-25 18:26:35 +00:00
|
|
|
socks5_stream
|
2007-04-17 00:23:46 +00:00
|
|
|
stat
|
|
|
|
storage
|
|
|
|
torrent
|
|
|
|
torrent_handle
|
|
|
|
torrent_info
|
2014-07-06 19:18:00 +00:00
|
|
|
torrent_peer
|
|
|
|
torrent_peer_allocator
|
2009-11-25 06:55:34 +00:00
|
|
|
time
|
2007-04-17 00:23:46 +00:00
|
|
|
tracker_manager
|
|
|
|
http_tracker_connection
|
|
|
|
udp_tracker_connection
|
|
|
|
sha1
|
2010-11-29 01:33:05 +00:00
|
|
|
timestamp_history
|
2007-12-09 04:15:24 +00:00
|
|
|
udp_socket
|
2007-04-17 00:23:46 +00:00
|
|
|
upnp
|
2012-03-20 03:53:07 +00:00
|
|
|
utf8
|
2010-11-29 01:33:05 +00:00
|
|
|
utp_socket_manager
|
|
|
|
utp_stream
|
2007-04-17 00:23:46 +00:00
|
|
|
file_pool
|
|
|
|
lsd
|
2011-07-31 02:24:36 +00:00
|
|
|
disk_buffer_pool
|
2007-06-10 20:46:09 +00:00
|
|
|
disk_io_thread
|
2007-09-09 23:52:34 +00:00
|
|
|
enum_net
|
|
|
|
broadcast_socket
|
2007-12-03 06:03:16 +00:00
|
|
|
magnet_uri
|
2008-05-17 14:19:34 +00:00
|
|
|
parse_url
|
2008-11-13 06:39:08 +00:00
|
|
|
ConvertUTF
|
2010-08-26 17:00:24 +00:00
|
|
|
thread
|
2014-05-03 21:10:44 +00:00
|
|
|
xml_parse
|
2014-07-06 19:18:00 +00:00
|
|
|
peer_class
|
|
|
|
peer_class_set
|
|
|
|
part_file
|
|
|
|
stat_cache
|
|
|
|
request_blocks
|
|
|
|
session_stats
|
|
|
|
performance_counters
|
|
|
|
resolver
|
2015-01-06 08:08:49 +00:00
|
|
|
session_settings
|
2015-08-25 04:18:10 +02:00
|
|
|
proxy_settings
|
2015-06-28 22:47:11 -04:00
|
|
|
file_progress
|
2007-12-18 06:04:54 +00:00
|
|
|
|
|
|
|
# -- extensions --
|
|
|
|
metadata_transfer
|
|
|
|
ut_pex
|
|
|
|
ut_metadata
|
2008-11-27 20:51:59 +00:00
|
|
|
lt_trackers
|
2007-12-18 06:04:54 +00:00
|
|
|
smart_ban
|
2006-09-01 03:06:00 +00:00
|
|
|
;
|
2006-08-01 15:27:08 +00:00
|
|
|
|
2006-09-01 03:06:00 +00:00
|
|
|
KADEMLIA_SOURCES =
|
2009-04-02 23:21:44 +00:00
|
|
|
dht_tracker
|
|
|
|
node
|
2015-03-16 04:38:28 +00:00
|
|
|
node_entry
|
2009-04-02 23:21:44 +00:00
|
|
|
refresh
|
|
|
|
rpc_manager
|
|
|
|
find_data
|
|
|
|
node_id
|
|
|
|
routing_table
|
|
|
|
traversal_algorithm
|
2014-07-06 19:18:00 +00:00
|
|
|
dos_blocker
|
2013-12-27 04:28:25 +00:00
|
|
|
get_peers
|
|
|
|
item
|
|
|
|
get_item
|
2004-02-21 11:52:21 +00:00
|
|
|
;
|
2004-02-08 16:04:50 +00:00
|
|
|
|
2013-08-18 16:01:20 +00:00
|
|
|
ED25519_SOURCES =
|
|
|
|
add_scalar
|
|
|
|
fe
|
|
|
|
ge
|
|
|
|
key_exchange
|
|
|
|
keypair
|
|
|
|
sc
|
|
|
|
seed
|
|
|
|
sha512
|
|
|
|
sign
|
|
|
|
verify
|
|
|
|
;
|
|
|
|
|
2015-05-17 23:32:13 +00:00
|
|
|
local usage-requirements =
|
2006-09-01 03:06:00 +00:00
|
|
|
<include>./include
|
2008-05-20 09:45:55 +00:00
|
|
|
<include>./include/libtorrent
|
2009-01-27 08:24:48 +00:00
|
|
|
<include>/usr/sfw/include
|
2012-05-13 04:40:21 +00:00
|
|
|
# freebsd doesn't seem to include this automatically
|
|
|
|
# and iconv.h is installed there
|
|
|
|
<include>/usr/local/include
|
2006-09-01 03:06:00 +00:00
|
|
|
<variant>release:<define>NDEBUG
|
2008-11-29 21:33:21 +00:00
|
|
|
<variant>debug:<define>TORRENT_DEBUG
|
2006-09-01 03:06:00 +00:00
|
|
|
<define>_FILE_OFFSET_BITS=64
|
2009-01-07 01:58:43 +00:00
|
|
|
<define>BOOST_EXCEPTION_DISABLE
|
2010-11-29 01:33:05 +00:00
|
|
|
# enable cancel support in asio
|
|
|
|
<define>BOOST_ASIO_ENABLE_CANCELIO
|
2007-06-13 17:36:26 +00:00
|
|
|
<conditional>@linking
|
2015-02-10 04:00:44 +00:00
|
|
|
<conditional>@coverage
|
2006-09-01 03:06:00 +00:00
|
|
|
# these compiler settings just makes the compiler standard conforming
|
2008-12-28 19:15:24 +00:00
|
|
|
<toolset>msvc:<cflags>/Zc:wchar_t
|
|
|
|
<toolset>msvc:<cflags>/Zc:forScope
|
2007-09-01 04:08:39 +00:00
|
|
|
# msvc optimizations
|
|
|
|
<toolset>msvc,<variant>release:<linkflags>/OPT:ICF=5
|
|
|
|
<toolset>msvc,<variant>release:<linkflags>/OPT:REF
|
2015-04-18 02:33:39 +00:00
|
|
|
|
2015-08-08 19:18:05 -04:00
|
|
|
<cxxflags>$(CXXFLAGS)
|
|
|
|
<linkflags>$(LDFLAGS)
|
2009-06-27 19:30:15 +00:00
|
|
|
# this works around a bug in asio in boost-1.39
|
|
|
|
<define>BOOST_ASIO_HASH_MAP_BUCKETS=1021
|
2009-04-02 23:21:44 +00:00
|
|
|
<tag>@tag
|
2006-09-01 03:06:00 +00:00
|
|
|
;
|
|
|
|
|
2008-06-23 13:17:15 +00:00
|
|
|
project torrent ;
|
2007-06-13 17:36:26 +00:00
|
|
|
|
2008-06-23 13:17:15 +00:00
|
|
|
lib torrent
|
2007-06-13 01:48:24 +00:00
|
|
|
|
|
|
|
: # sources
|
2007-04-17 00:23:46 +00:00
|
|
|
src/$(SOURCES).cpp
|
2007-06-13 01:48:24 +00:00
|
|
|
|
|
|
|
: # requirements
|
2013-08-18 16:01:20 +00:00
|
|
|
<include>./ed25519/src
|
2007-06-13 01:48:24 +00:00
|
|
|
<threading>multi
|
2015-04-26 00:51:44 +00:00
|
|
|
<define>TORRENT_BUILDING_LIBRARY
|
2007-06-13 01:48:24 +00:00
|
|
|
<link>shared:<define>TORRENT_BUILDING_SHARED
|
2014-07-06 19:18:00 +00:00
|
|
|
<define>BOOST_NO_DEPRECATED
|
2012-06-12 16:38:15 +00:00
|
|
|
<link>shared:<define>BOOST_SYSTEM_SOURCE
|
2012-04-15 04:00:58 +00:00
|
|
|
|
2013-04-09 01:04:43 +00:00
|
|
|
<dht>on:<source>src/kademlia/$(KADEMLIA_SOURCES).cpp
|
2014-07-12 06:20:16 +00:00
|
|
|
<dht>on:<source>ed25519/src/$(ED25519_SOURCES).cpp
|
2013-08-18 16:01:20 +00:00
|
|
|
|
2007-06-13 17:36:26 +00:00
|
|
|
<conditional>@building
|
2015-04-18 02:33:39 +00:00
|
|
|
<conditional>@warnings
|
2015-08-08 19:18:05 -04:00
|
|
|
<cxxflags>$(CXXFLAGS)
|
2012-02-16 06:14:19 +00:00
|
|
|
|
2015-04-18 02:33:39 +00:00
|
|
|
# disable bogus deprecation warnings on msvc8
|
|
|
|
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
|
|
|
|
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
|
|
|
|
|
2007-06-13 01:48:24 +00:00
|
|
|
$(usage-requirements)
|
|
|
|
|
|
|
|
: # default build
|
2008-12-28 19:15:24 +00:00
|
|
|
<threading>multi
|
2007-06-13 01:48:24 +00:00
|
|
|
|
|
|
|
: # usage requirements
|
|
|
|
$(usage-requirements)
|
2012-06-03 05:13:08 +00:00
|
|
|
<link>shared:<define>TORRENT_LINKING_SHARED
|
2003-10-22 23:00:57 +00:00
|
|
|
;
|
|
|
|
|
2009-04-02 23:21:44 +00:00
|
|
|
headers = [ path.glob-tree include/libtorrent : *.hpp ] ;
|
|
|
|
|
|
|
|
package.install install
|
2015-05-17 23:32:13 +00:00
|
|
|
: <install-source-root>libtorrent
|
|
|
|
<install-no-version-symlinks>on
|
|
|
|
:
|
|
|
|
: torrent
|
|
|
|
: $(headers)
|
|
|
|
;
|
2009-04-02 23:21:44 +00:00
|
|
|
|