2007-06-13 03:48:24 +02:00
|
|
|
# This Jamfile requires boost-build v2 to build.
|
|
|
|
# The version shipped with boost 1.34.0
|
2004-02-18 01:08:20 +01:00
|
|
|
|
2004-02-04 21:20:53 +01:00
|
|
|
import modules ;
|
2004-02-21 12:52:21 +01:00
|
|
|
import os ;
|
2005-01-11 03:13:07 +01:00
|
|
|
import errors ;
|
2006-08-31 02:26:41 +02:00
|
|
|
import feature : feature ;
|
2009-04-03 01:21:44 +02:00
|
|
|
import package ;
|
|
|
|
import virtual-target ;
|
2004-02-04 21:20:53 +01:00
|
|
|
|
|
|
|
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
|
2008-05-14 02:21:57 +02:00
|
|
|
CXXFLAGS = [ modules.peek : CXXFLAGS ] ;
|
|
|
|
LDFLAGS = [ modules.peek : LDFLAGS ] ;
|
2004-02-04 21:20:53 +01:00
|
|
|
|
2004-07-25 23:44:53 +02:00
|
|
|
ECHO "BOOST_ROOT =" $(BOOST_ROOT) ;
|
|
|
|
ECHO "OS =" [ os.name ] ;
|
|
|
|
|
2007-07-07 23:27:36 +02:00
|
|
|
if $(BOOST_ROOT)
|
2005-01-11 03:13:07 +01:00
|
|
|
{
|
2007-07-07 23:27:36 +02:00
|
|
|
use-project /boost : $(BOOST_ROOT) ;
|
2005-01-11 03:13:07 +01:00
|
|
|
}
|
|
|
|
|
2009-04-03 01:21:44 +02:00
|
|
|
VERSION = 0.15 ;
|
|
|
|
|
2007-06-13 19:36:26 +02:00
|
|
|
# rule for linking the correct libraries depending
|
|
|
|
# on features and target-os
|
|
|
|
rule linking ( properties * )
|
2007-06-13 03:48:24 +02:00
|
|
|
{
|
|
|
|
local result ;
|
|
|
|
|
2007-06-13 19:36:26 +02:00
|
|
|
# openssl libraries, if enabled
|
2007-08-20 06:58:56 +02:00
|
|
|
if <openssl>sha-1 in $(properties)
|
|
|
|
|| <openssl>pe in $(properties)
|
2007-06-13 03:48:24 +02:00
|
|
|
{
|
2007-09-10 09:51:58 +02:00
|
|
|
# exclude gcc from a regular windows build to make mingw
|
|
|
|
# link against the regular unix library name
|
2007-12-16 00:38:54 +01:00
|
|
|
|
|
|
|
if <target-os>windows in $(properties)
|
|
|
|
{
|
|
|
|
result += <library>gdi32 ;
|
|
|
|
}
|
|
|
|
|
2007-09-10 09:51:58 +02:00
|
|
|
if <target-os>windows in $(properties) && ! <toolset>gcc in $(properties)
|
2007-06-13 03:48:24 +02:00
|
|
|
{
|
2007-06-13 19:36:26 +02:00
|
|
|
result += <library>ssleay32
|
|
|
|
<library>libeay32
|
|
|
|
<library>advapi32
|
|
|
|
<library>user32
|
|
|
|
<library>shell32
|
|
|
|
;
|
2007-06-13 03:48:24 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-01-27 23:39:50 +01:00
|
|
|
result += <library>crypto <library>ssl ;
|
2007-06-13 03:48:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-04-05 06:53:22 +02:00
|
|
|
if <geoip>shared in $(properties)
|
|
|
|
{
|
|
|
|
result += <library>GeoIP ;
|
|
|
|
}
|
|
|
|
|
2007-06-13 19:36:26 +02:00
|
|
|
# socket functions on windows require winsock libraries
|
2007-08-20 06:58:56 +02:00
|
|
|
if <target-os>windows in $(properties)
|
|
|
|
|| <target-os>cygwin in $(properties)
|
2007-06-13 19:36:26 +02:00
|
|
|
{
|
|
|
|
result += <library>ws2_32
|
|
|
|
<library>wsock32
|
|
|
|
<define>WIN32_LEAN_AND_MEAN
|
|
|
|
<define>_WIN32_WINNT=0x0500
|
|
|
|
<define>__USE_W32_SOCKETS
|
|
|
|
<define>WIN32
|
|
|
|
<define>_WIN32
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2009-01-27 09:24:48 +01:00
|
|
|
if <target-os>solaris in $(properties)
|
|
|
|
{
|
|
|
|
result += <library>libsocket <library>libnsl ;
|
|
|
|
}
|
|
|
|
|
2007-08-21 19:43:19 +02:00
|
|
|
if <test-coverage>on in $(properties)
|
|
|
|
&& ( <toolset>gcc in $(properties)
|
|
|
|
|| <toolset>darwin in $(properties) )
|
|
|
|
{
|
2008-07-30 08:43:01 +02:00
|
|
|
result += <cxxflags>-fprofile-arcs <cxxflags>-ftest-coverage
|
|
|
|
<linkflags>-lgcov <define>NDEBUG ;
|
2007-08-21 19:43:19 +02:00
|
|
|
}
|
|
|
|
|
2007-06-13 19:36:26 +02:00
|
|
|
# clock_gettime on linux requires librt
|
2008-04-05 07:36:18 +02:00
|
|
|
if <need-librt>yes in $(properties)
|
2007-06-13 19:36:26 +02:00
|
|
|
{
|
2008-05-09 19:07:08 +02:00
|
|
|
result += <library>librt ;
|
2007-06-13 19:36:26 +02:00
|
|
|
}
|
|
|
|
|
2008-04-13 23:11:37 +02:00
|
|
|
if <tcmalloc>yes in $(properties)
|
|
|
|
{
|
|
|
|
result += <library>tcmalloc ;
|
|
|
|
}
|
|
|
|
|
2007-07-07 23:27:36 +02:00
|
|
|
if <boost>system in $(properties)
|
|
|
|
{
|
2007-11-30 01:35:09 +01:00
|
|
|
result += <library>boost_filesystem
|
2008-05-08 03:53:05 +02:00
|
|
|
<library>boost_thread
|
2008-05-15 18:58:32 +02:00
|
|
|
<library>boost_system
|
2007-07-07 23:27:36 +02:00
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2007-08-20 06:58:56 +02:00
|
|
|
if <toolset>gcc in $(properties)
|
|
|
|
&& <target-os>linux in $(properties)
|
|
|
|
&& <variant>debug in $(properties)
|
|
|
|
{
|
|
|
|
# for backtraces in assertion failures
|
|
|
|
# which only works on ELF targets with gcc
|
2007-09-01 06:08:39 +02:00
|
|
|
result += <linkflags>-export-dynamic <cxxflags>-rdynamic ;
|
2007-08-20 06:58:56 +02:00
|
|
|
}
|
|
|
|
|
2007-07-07 23:27:36 +02:00
|
|
|
if <boost>source in $(properties)
|
|
|
|
{
|
2008-06-28 10:59:25 +02:00
|
|
|
if <boost-link>static in $(properties)
|
|
|
|
{
|
2008-12-21 03:38:37 +01:00
|
|
|
if <toolset>gcc in $(properties) && <link>shared in $(properties)
|
|
|
|
{
|
|
|
|
result += <fpic>on ;
|
|
|
|
}
|
|
|
|
|
|
|
|
result += <library>/boost/filesystem//boost_filesystem/<link>static
|
2008-12-21 00:30:53 +01:00
|
|
|
<library>/boost/system//boost_system/<link>static
|
|
|
|
;
|
2008-12-21 03:38:37 +01:00
|
|
|
|
|
|
|
# if we're building a shared library
|
|
|
|
# we need to link dynamically against the
|
|
|
|
# pthread library
|
|
|
|
if <fpic>on in $(properties) && <target-os>linux in $(properties)
|
|
|
|
{
|
|
|
|
result += <library>/boost/thread//boost_thread/<link>shared ;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
result += <library>/boost/thread//boost_thread/<link>static ;
|
|
|
|
}
|
2008-06-28 10:59:25 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
result += <library>/boost/thread//boost_thread/<link>shared
|
|
|
|
<library>/boost/filesystem//boost_filesystem/<link>shared
|
2009-01-27 09:24:48 +01:00
|
|
|
<library>/boost/system//boost_system/<link>shared
|
|
|
|
;
|
2008-06-28 10:59:25 +02:00
|
|
|
}
|
2008-12-20 22:12:39 +01:00
|
|
|
result += <include>$(BOOST_ROOT) <define>BOOST_ALL_NO_LIB ;
|
2007-07-07 23:27:36 +02:00
|
|
|
}
|
|
|
|
|
2008-06-07 19:36:33 +02:00
|
|
|
if <boost>system in $(properties)
|
|
|
|
{
|
|
|
|
# on mac the boost headers are installed in
|
|
|
|
# a directory that isn't automatically accessable
|
|
|
|
result += <include>/opt/local/include/boost-1_35
|
|
|
|
<include>/opt/local/include/boost
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2007-06-13 03:48:24 +02:00
|
|
|
return $(result) ;
|
|
|
|
}
|
|
|
|
|
2007-06-13 19:36:26 +02:00
|
|
|
# rule for adding the right source files
|
|
|
|
# depending on target-os and features
|
|
|
|
rule building ( properties * )
|
2007-06-13 03:48:24 +02:00
|
|
|
{
|
|
|
|
local result ;
|
|
|
|
|
2007-12-31 00:30:14 +01:00
|
|
|
if ( <target-os>linux in $(properties)
|
2007-09-17 04:32:51 +02:00
|
|
|
|| <target-os>darwin in $(properties) )
|
|
|
|
&& ( <toolset>gcc in $(properties)
|
|
|
|
|| <toolset>darwin in $(properties) )
|
2007-09-01 06:08:39 +02:00
|
|
|
{
|
|
|
|
result += <source>src/assert.cpp ;
|
|
|
|
}
|
|
|
|
|
2008-04-05 06:53:22 +02:00
|
|
|
if <geoip>static in $(properties)
|
|
|
|
{
|
|
|
|
result += <source>src/GeoIP.c ;
|
|
|
|
}
|
|
|
|
|
2007-06-13 03:48:24 +02:00
|
|
|
if <openssl>off in $(properties)
|
|
|
|
{
|
|
|
|
result += <source>src/sha1.cpp ;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if <openssl>pe in $(properties)
|
|
|
|
{
|
|
|
|
result += <source>src/pe_crypto.cpp ;
|
|
|
|
}
|
2008-09-03 02:55:49 +02:00
|
|
|
|
|
|
|
if <target-os>linux in $(properties)
|
|
|
|
{
|
|
|
|
# linker library on linux, required when using openssl
|
|
|
|
result += <source>/usr/lib/libdl.so ;
|
|
|
|
}
|
|
|
|
|
2007-06-13 03:48:24 +02:00
|
|
|
}
|
|
|
|
|
2007-12-26 05:44:25 +01:00
|
|
|
if <memdebug>on in $(properties)
|
|
|
|
{
|
|
|
|
result += <source>src/memdebug.cpp ;
|
|
|
|
}
|
|
|
|
|
2007-06-13 03:48:24 +02:00
|
|
|
return $(result) ;
|
|
|
|
}
|
2004-03-17 13:14:44 +01:00
|
|
|
|
2009-04-03 01:21:44 +02: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) ;
|
|
|
|
}
|
|
|
|
|
2008-04-13 23:11:37 +02:00
|
|
|
feature tcmalloc : no yes : composite propagated link-incompatible ;
|
|
|
|
|
2008-04-05 07:36:18 +02:00
|
|
|
feature need-librt : no yes : composite propagated link-incompatible ;
|
|
|
|
|
2008-04-09 07:36:37 +02:00
|
|
|
feature pool-allocators : on off : composite propagated link-incompatible ;
|
2008-04-09 07:19:11 +02:00
|
|
|
feature.compose <pool-allocators>off : <define>TORRENT_DISABLE_POOL_ALLOCATOR ;
|
|
|
|
|
2008-04-05 06:53:22 +02:00
|
|
|
feature geoip : off static shared : composite propagated link-incompatible ;
|
|
|
|
feature.compose <geoip>off : <define>TORRENT_DISABLE_GEO_IP ;
|
|
|
|
|
2008-01-12 19:47:26 +01:00
|
|
|
feature bandwidth-limit-logging : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <bandwidth-limit-logging>on : <define>TORRENT_VERBOSE_BANDWIDTH_LIMIT ;
|
|
|
|
|
2008-07-12 19:51:59 +02:00
|
|
|
feature invariant-checks : on off full : composite propagated link-incompatible ;
|
2008-01-13 07:17:56 +01:00
|
|
|
feature.compose <invariant-checks>off : <define>TORRENT_DISABLE_INVARIANT_CHECKS ;
|
2008-07-12 19:51:59 +02:00
|
|
|
feature.compose <invariant-checks>full : <define>TORRENT_EXPENSIVE_INVARIANT_CHECKS ;
|
2008-01-13 07:17:56 +01:00
|
|
|
|
2007-09-25 22:36:02 +02:00
|
|
|
feature disk-stats : off on : composite propagated link-incompatible ;
|
2007-09-17 10:15:54 +02:00
|
|
|
feature.compose <disk-stats>on : <define>TORRENT_DISK_STATS ;
|
|
|
|
|
2007-12-27 07:37:18 +01:00
|
|
|
feature memdebug : off on : composite propagated ;
|
|
|
|
feature.compose <memdebug>on : <define>TORRENT_MEMDEBUG ;
|
2007-12-26 05:44:25 +01:00
|
|
|
|
2009-09-05 09:21:10 +02:00
|
|
|
feature simulate-slow-read : off on : composite propagated ;
|
|
|
|
feature.compose <simulate-slow-read>on : <define>TORRENT_SIMULATE_SLOW_READ ;
|
|
|
|
|
2008-02-07 08:09:52 +01:00
|
|
|
feature logging : none default errors verbose : composite propagated link-incompatible ;
|
2006-09-01 05:06:00 +02:00
|
|
|
feature.compose <logging>default : <define>TORRENT_LOGGING ;
|
2008-02-17 22:37:20 +01:00
|
|
|
feature.compose <logging>errors : <define>TORRENT_ERROR_LOGGING ;
|
2006-09-01 05:06:00 +02:00
|
|
|
feature.compose <logging>verbose : <define>TORRENT_VERBOSE_LOGGING ;
|
2004-11-01 00:16:08 +01:00
|
|
|
|
2007-09-25 22:36:02 +02:00
|
|
|
feature dht-support : on off logging : composite propagated link-incompatible ;
|
2006-09-01 05:06:00 +02:00
|
|
|
feature.compose <dht-support>off : <define>TORRENT_DISABLE_DHT ;
|
|
|
|
feature.compose <dht-support>logging : <define>TORRENT_DHT_VERBOSE_LOGGING ;
|
2004-02-04 12:00:29 +01:00
|
|
|
|
2007-09-25 22:36:02 +02:00
|
|
|
feature openssl : pe sha-1 off : composite propagated link-incompatible ;
|
2007-06-13 03:48:24 +02:00
|
|
|
feature.compose <openssl>pe : <define>TORRENT_USE_OPENSSL ;
|
|
|
|
feature.compose <openssl>sha-1 : <define>TORRENT_USE_OPENSSL <define>TORRENT_DISABLE_ENCRYPTION ;
|
|
|
|
feature.compose <openssl>off : <define>TORRENT_DISABLE_ENCRYPTION ;
|
2007-04-15 06:30:52 +02:00
|
|
|
|
2007-09-25 22:36:02 +02:00
|
|
|
feature resolve-countries : on off : composite propagated link-incompatible ;
|
2007-05-02 21:47:38 +02:00
|
|
|
feature.compose <resolve-countries>off : <define>TORRENT_DISABLE_RESOLVE_COUNTRIES ;
|
|
|
|
|
2008-07-20 13:53:21 +02:00
|
|
|
feature character-set : unicode ansi : composite propagated link-incompatible ;
|
2007-04-18 21:12:30 +02:00
|
|
|
feature.compose <character-set>unicode : <define>_UNICODE <define>UNICODE ;
|
|
|
|
|
2007-06-13 03:48:24 +02:00
|
|
|
feature zlib : shipped system : composite propagated link-incompatible ;
|
2007-06-06 02:41:20 +02:00
|
|
|
|
2008-08-03 17:14:08 +02:00
|
|
|
feature deprecated-functions : on off : composite propagated link-incompatible ;
|
|
|
|
feature.compose <deprecated-functions>off : <define>TORRENT_NO_DEPRECATE ;
|
|
|
|
|
2007-09-25 22:36:02 +02:00
|
|
|
feature statistics : off on : composite propagated link-incompatible ;
|
2007-05-14 00:01:21 +02:00
|
|
|
feature.compose <statistics>on : <define>TORRENT_STATS ;
|
|
|
|
|
2007-05-14 09:31:01 +02:00
|
|
|
feature upnp-logging : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <upnp-logging>on : <define>TORRENT_UPNP_LOGGING ;
|
|
|
|
|
2007-07-07 23:27:36 +02:00
|
|
|
feature boost : system source : link-incompatible propagated ;
|
2008-06-28 10:59:25 +02:00
|
|
|
feature boost-link : static shared : composite ;
|
2007-07-07 23:27:36 +02:00
|
|
|
|
2007-08-03 08:13:26 +02:00
|
|
|
feature debug-iterators : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <debug-iterators>on : <define>_SCL_SECURE=1 <define>_GLIBCXX_DEBUG ;
|
|
|
|
|
2007-08-21 19:43:19 +02:00
|
|
|
feature test-coverage : off on : composite propagated ;
|
|
|
|
|
2008-12-21 00:30:53 +01:00
|
|
|
feature fpic : off on : composite propagated link-incompatible ;
|
|
|
|
feature.compose <fpic>on : <cflags>-fPIC ;
|
2008-12-21 03:38:37 +01:00
|
|
|
feature.compose <fpic>off : <toolset>darwin:<cflags>-mdynamic-no-pic ;
|
2008-12-21 00:30:53 +01:00
|
|
|
|
2008-12-21 21:33:26 +01:00
|
|
|
feature visibility : default hidden : composite propagated link-incompatible ;
|
2008-12-21 00:30:53 +01:00
|
|
|
feature.compose <visibility>hidden : <cflags>-fvisibility=hidden ;
|
|
|
|
|
2007-06-13 19:36:26 +02: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 ;
|
|
|
|
|
2009-03-02 06:43:56 +01:00
|
|
|
local boost-library-search-path =
|
|
|
|
<search>/opt/local/lib
|
|
|
|
<search>/usr/lib
|
|
|
|
<search>/usr/local/lib
|
|
|
|
<search>/sw/lib
|
|
|
|
;
|
2007-07-08 22:21:22 +02:00
|
|
|
|
2009-03-02 06:43:56 +01:00
|
|
|
lib boost_filesystem : : <target-os>darwin <name>boost_filesystem-mt $(boost-library-search-path) ;
|
|
|
|
lib boost_thread : : <target-os>darwin <name>boost_thread-mt $(boost-library-search-path) ;
|
|
|
|
lib boost_system : : <target-os>darwin <name>boost_system-mt $(boost-library-search-path) ;
|
|
|
|
|
|
|
|
lib boost_filesystem : : <name>boost_filesystem ;
|
|
|
|
lib boost_thread : : <name>boost_thread ;
|
|
|
|
lib boost_system : : <name>boost_system ;
|
2007-07-07 23:27:36 +02:00
|
|
|
|
2007-06-13 19:36:26 +02:00
|
|
|
# openssl on linux/bsd/macos etc.
|
2009-03-02 06:43:56 +01:00
|
|
|
lib crypto : : <name>crypto ;
|
|
|
|
lib ssl : : <name>ssl ;
|
2007-06-13 19:36:26 +02:00
|
|
|
|
|
|
|
# time functions used on linux require librt
|
|
|
|
lib librt : : <name>rt ;
|
|
|
|
|
2009-03-02 06:43:56 +01:00
|
|
|
lib libsocket : : <use>libnsl <name>socket <link>shared <search>/usr/sfw/lib ;
|
|
|
|
lib libnsl : : <name>nsl <link>shared <search>/usr/sfw/lib ;
|
2009-01-27 09:24:48 +01:00
|
|
|
|
2009-03-02 06:43:56 +01:00
|
|
|
lib tcmalloc : : <name>tcmalloc ;
|
2008-04-13 23:11:37 +02:00
|
|
|
|
2007-06-13 19:36:26 +02:00
|
|
|
# libz
|
2007-06-13 03:48:24 +02:00
|
|
|
lib zlib-target : : <name>z ;
|
|
|
|
|
2008-11-23 21:40:08 +01:00
|
|
|
# GeoIP shared library
|
|
|
|
lib GeoIP : : <name>GeoIP ;
|
|
|
|
|
2007-06-13 19:36:26 +02:00
|
|
|
# socket libraries on windows
|
|
|
|
lib wsock32 : : <name>wsock32 ;
|
|
|
|
lib ws2_32 : : <name>ws2_32 ;
|
|
|
|
|
2003-10-23 01:00:57 +02:00
|
|
|
SOURCES =
|
2007-04-17 02:23:46 +02:00
|
|
|
alert
|
2009-01-15 18:09:36 +01:00
|
|
|
allocator
|
2007-12-31 00:30:14 +01:00
|
|
|
assert
|
2009-09-16 06:41:35 +02:00
|
|
|
bandwidth_limit
|
|
|
|
bandwidth_manager
|
|
|
|
bandwidth_queue_entry
|
2007-05-05 02:29:33 +02:00
|
|
|
connection_queue
|
2008-05-14 07:29:42 +02:00
|
|
|
create_torrent
|
2008-04-10 12:03:23 +02:00
|
|
|
disk_buffer_holder
|
2007-04-17 02:23:46 +02:00
|
|
|
entry
|
2008-07-18 12:22:16 +02:00
|
|
|
error_code
|
2008-05-28 10:44:40 +02:00
|
|
|
file_storage
|
2008-04-11 05:41:09 +02:00
|
|
|
lazy_bdecode
|
2007-04-17 02:23:46 +02:00
|
|
|
escape_string
|
2008-07-20 13:14:54 +02:00
|
|
|
file
|
2008-01-30 19:32:13 +01:00
|
|
|
gzip
|
2007-04-17 02:23:46 +02:00
|
|
|
http_connection
|
2007-04-25 20:26:35 +02:00
|
|
|
http_stream
|
2008-01-12 10:36:03 +01:00
|
|
|
http_parser
|
2007-04-17 02:23:46 +02:00
|
|
|
identify_client
|
|
|
|
ip_filter
|
|
|
|
peer_connection
|
|
|
|
bt_peer_connection
|
|
|
|
web_peer_connection
|
2008-12-30 04:54:07 +01:00
|
|
|
http_seed_connection
|
2009-08-20 05:19:12 +02:00
|
|
|
i2p_stream
|
2007-04-25 20:26:35 +02:00
|
|
|
instantiate_connection
|
2007-04-17 02:23:46 +02:00
|
|
|
natpmp
|
|
|
|
piece_picker
|
|
|
|
policy
|
|
|
|
session
|
|
|
|
session_impl
|
2009-09-16 05:46:36 +02:00
|
|
|
socket_io
|
2007-04-25 20:26:35 +02:00
|
|
|
socks5_stream
|
2007-04-17 02:23:46 +02:00
|
|
|
stat
|
|
|
|
storage
|
|
|
|
torrent
|
|
|
|
torrent_handle
|
|
|
|
torrent_info
|
|
|
|
tracker_manager
|
|
|
|
http_tracker_connection
|
|
|
|
udp_tracker_connection
|
|
|
|
sha1
|
2007-12-09 05:15:24 +01:00
|
|
|
udp_socket
|
2007-04-17 02:23:46 +02:00
|
|
|
upnp
|
|
|
|
logger
|
|
|
|
file_pool
|
|
|
|
lsd
|
2007-06-10 22:46:09 +02:00
|
|
|
disk_io_thread
|
2007-09-10 01:52:34 +02:00
|
|
|
enum_net
|
|
|
|
broadcast_socket
|
2007-12-03 07:03:16 +01:00
|
|
|
magnet_uri
|
2008-05-17 16:19:34 +02:00
|
|
|
parse_url
|
2008-11-13 07:39:08 +01:00
|
|
|
ConvertUTF
|
2007-12-18 07:04:54 +01:00
|
|
|
|
|
|
|
# -- extensions --
|
|
|
|
metadata_transfer
|
|
|
|
ut_pex
|
|
|
|
ut_metadata
|
2008-11-27 21:51:59 +01:00
|
|
|
lt_trackers
|
2007-12-18 07:04:54 +01:00
|
|
|
smart_ban
|
2006-09-01 05:06:00 +02:00
|
|
|
;
|
2006-08-01 17:27:08 +02:00
|
|
|
|
2006-09-01 05:06:00 +02:00
|
|
|
KADEMLIA_SOURCES =
|
2009-04-03 01:21:44 +02:00
|
|
|
dht_tracker
|
|
|
|
node
|
|
|
|
refresh
|
|
|
|
rpc_manager
|
|
|
|
find_data
|
|
|
|
node_id
|
|
|
|
routing_table
|
|
|
|
traversal_algorithm
|
2004-02-21 12:52:21 +01:00
|
|
|
;
|
2004-02-08 17:04:50 +01:00
|
|
|
|
2004-03-28 19:45:37 +02:00
|
|
|
ZLIB_SOURCES =
|
2007-04-17 02:23:46 +02:00
|
|
|
adler32
|
|
|
|
compress
|
|
|
|
crc32
|
|
|
|
deflate
|
|
|
|
gzio
|
|
|
|
infback
|
|
|
|
inffast
|
|
|
|
inflate
|
|
|
|
inftrees
|
|
|
|
trees
|
|
|
|
uncompr
|
|
|
|
zutil
|
2004-03-28 19:45:37 +02:00
|
|
|
;
|
|
|
|
|
2007-06-13 03:48:24 +02:00
|
|
|
local usage-requirements =
|
2006-09-01 05:06:00 +02:00
|
|
|
<include>./include
|
2008-05-20 11:45:55 +02:00
|
|
|
<include>./include/libtorrent
|
2009-01-27 09:24:48 +01:00
|
|
|
<include>/usr/sfw/include
|
2007-06-06 02:41:20 +02:00
|
|
|
<zlib>shipped:<include>./zlib
|
2006-09-01 05:06:00 +02:00
|
|
|
<variant>release:<define>NDEBUG
|
2008-11-29 22:33:21 +01:00
|
|
|
<variant>debug:<define>TORRENT_DEBUG
|
2006-09-01 05:06:00 +02:00
|
|
|
<define>_FILE_OFFSET_BITS=64
|
2009-01-07 02:58:43 +01:00
|
|
|
<define>BOOST_EXCEPTION_DISABLE
|
2007-06-13 19:36:26 +02:00
|
|
|
<conditional>@linking
|
2007-06-13 03:48:24 +02:00
|
|
|
<zlib>system:<library>zlib-target
|
2006-09-01 05:06:00 +02:00
|
|
|
# these compiler settings just makes the compiler standard conforming
|
2008-12-28 20:15:24 +01:00
|
|
|
<toolset>msvc:<cflags>/Zc:wchar_t
|
|
|
|
<toolset>msvc:<cflags>/Zc:forScope
|
2006-11-02 13:44:33 +01:00
|
|
|
# disable bogus deprecation warnings on msvc8
|
|
|
|
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
|
|
|
|
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
|
2007-09-01 06:08:39 +02:00
|
|
|
# msvc optimizations
|
|
|
|
<toolset>msvc,<variant>release:<linkflags>/OPT:ICF=5
|
|
|
|
<toolset>msvc,<variant>release:<linkflags>/OPT:REF
|
|
|
|
# disable warning C4503: decorated name length exceeded, name was truncated
|
|
|
|
<toolset>msvc:<cxxflags>/wd4503
|
2007-09-10 09:51:58 +02:00
|
|
|
# disable some warnings for gcc
|
2008-12-28 20:15:24 +01:00
|
|
|
<toolset>gcc:<cflags>-fno-strict-aliasing
|
|
|
|
<toolset>gcc:<cflags>-Wno-missing-braces
|
2008-05-14 02:21:57 +02:00
|
|
|
<boost>system:<cxxflags>$(CXXFLAGS)
|
|
|
|
<boost>system:<linkflags>$(LDFLAGS)
|
2009-06-27 21:30:15 +02:00
|
|
|
# this works around a bug in asio in boost-1.39
|
|
|
|
<define>BOOST_ASIO_HASH_MAP_BUCKETS=1021
|
2009-04-03 01:21:44 +02:00
|
|
|
<tag>@tag
|
2006-09-01 05:06:00 +02:00
|
|
|
;
|
|
|
|
|
2008-06-23 15:17:15 +02:00
|
|
|
project torrent ;
|
2007-06-13 19:36:26 +02:00
|
|
|
|
2008-06-23 15:17:15 +02:00
|
|
|
lib torrent
|
2007-06-13 03:48:24 +02:00
|
|
|
|
|
|
|
: # sources
|
2007-04-17 02:23:46 +02:00
|
|
|
src/$(SOURCES).cpp
|
2007-06-13 03:48:24 +02:00
|
|
|
|
|
|
|
: # requirements
|
|
|
|
<define>BOOST_THREAD_USE_LIB
|
|
|
|
<threading>multi
|
|
|
|
<link>shared:<define>TORRENT_BUILDING_SHARED
|
2009-04-03 01:21:44 +02:00
|
|
|
<dht-support>on:<source>src/kademlia/$(KADEMLIA_SOURCES).cpp
|
2009-04-04 09:31:24 +02:00
|
|
|
<dht-support>logging:<source>src/kademlia/$(KADEMLIA_SOURCES).cpp
|
2007-06-06 02:41:20 +02:00
|
|
|
<zlib>shipped:<source>zlib/$(ZLIB_SOURCES).c
|
2007-06-13 19:36:26 +02:00
|
|
|
<conditional>@building
|
2008-05-14 02:21:57 +02:00
|
|
|
<boost>system:<cxxflags>$(CXXFLAGS)
|
2007-06-13 03:48:24 +02:00
|
|
|
$(usage-requirements)
|
|
|
|
|
|
|
|
: # default build
|
|
|
|
<link>static
|
2008-12-28 20:15:24 +01:00
|
|
|
<threading>multi
|
2007-06-13 03:48:24 +02:00
|
|
|
|
|
|
|
: # usage requirements
|
|
|
|
$(usage-requirements)
|
2003-10-23 01:00:57 +02:00
|
|
|
;
|
|
|
|
|
2009-04-03 01:21:44 +02:00
|
|
|
headers = [ path.glob-tree include/libtorrent : *.hpp ] ;
|
|
|
|
|
|
|
|
package.install install
|
|
|
|
: <install-header-subdir>libtorrent
|
|
|
|
<install-source-root>libtorrent
|
|
|
|
<install-no-version-symlinks>on
|
|
|
|
:
|
|
|
|
: torrent
|
|
|
|
: $(headers)
|
|
|
|
;
|
|
|
|
|