2004-02-18 01:08:20 +01:00
|
|
|
#This Jamfile requires boost-build v2 to build.
|
|
|
|
|
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 ;
|
2007-03-17 18:15:16 +01:00
|
|
|
#import pch ;
|
2004-02-04 21:20:53 +01:00
|
|
|
|
|
|
|
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
|
|
|
|
|
2004-07-25 23:44:53 +02:00
|
|
|
ECHO "BOOST_ROOT =" $(BOOST_ROOT) ;
|
|
|
|
ECHO "OS =" [ os.name ] ;
|
|
|
|
|
2005-01-11 03:13:07 +01:00
|
|
|
if ! $(BOOST_ROOT)
|
|
|
|
{
|
|
|
|
errors.user-error
|
|
|
|
"BOOST_ROOT must be set to your boost installation path." ;
|
|
|
|
}
|
|
|
|
|
2004-11-01 00:16:08 +01:00
|
|
|
use-project /boost : $(BOOST_ROOT) ;
|
|
|
|
|
2004-03-17 13:14:44 +01:00
|
|
|
|
2006-09-01 05:06:00 +02:00
|
|
|
feature logging : none default verbose : composite propagated symmetric link-incompatible ;
|
|
|
|
feature.compose <logging>default : <define>TORRENT_LOGGING ;
|
|
|
|
feature.compose <logging>verbose : <define>TORRENT_VERBOSE_LOGGING ;
|
2004-11-01 00:16:08 +01:00
|
|
|
|
2006-09-01 05:06:00 +02:00
|
|
|
feature dht-support : on off logging : composite propagated symmetric link-incompatible ;
|
|
|
|
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-04-15 06:30:52 +02:00
|
|
|
feature openssl : off on : composite propagated symmetric link-incompatible ;
|
|
|
|
feature.compose <openssl>on : <define>TORRENT_USE_OPENSSL ;
|
|
|
|
|
2007-05-14 00:09:25 +02:00
|
|
|
feature resolve-countries : on off : composite propagated symmetric link-incompatible ;
|
2007-05-02 21:47:38 +02:00
|
|
|
feature.compose <resolve-countries>off : <define>TORRENT_DISABLE_RESOLVE_COUNTRIES ;
|
|
|
|
|
2007-04-18 21:12:30 +02:00
|
|
|
feature character-set : ansi unicode : composite propagated link-incompatible ;
|
|
|
|
feature.compose <character-set>unicode : <define>_UNICODE <define>UNICODE ;
|
|
|
|
|
2007-05-14 00:09:25 +02:00
|
|
|
feature statistics : off on : composite propagated symmetric 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 ;
|
|
|
|
|
2003-10-23 01:00:57 +02:00
|
|
|
SOURCES =
|
2007-04-17 02:23:46 +02:00
|
|
|
allocate_resources
|
|
|
|
alert
|
|
|
|
bandwidth_manager
|
2007-05-05 02:29:33 +02:00
|
|
|
connection_queue
|
2007-04-17 02:23:46 +02:00
|
|
|
entry
|
|
|
|
escape_string
|
|
|
|
http_connection
|
2007-04-25 20:26:35 +02:00
|
|
|
http_stream
|
2007-04-17 02:23:46 +02:00
|
|
|
identify_client
|
|
|
|
ip_filter
|
|
|
|
peer_connection
|
|
|
|
bt_peer_connection
|
|
|
|
web_peer_connection
|
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
|
2007-05-31 01:35:14 +02:00
|
|
|
socks4_stream
|
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
|
|
|
|
metadata_transfer
|
|
|
|
upnp
|
|
|
|
ut_pex
|
|
|
|
logger
|
|
|
|
file_pool
|
|
|
|
lsd
|
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 =
|
2007-04-17 02:23:46 +02:00
|
|
|
kademlia/closest_nodes
|
|
|
|
kademlia/dht_tracker
|
|
|
|
kademlia/node
|
|
|
|
kademlia/refresh
|
|
|
|
kademlia/rpc_manager
|
|
|
|
kademlia/find_data
|
|
|
|
kademlia/node_id
|
|
|
|
kademlia/routing_table
|
|
|
|
kademlia/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
|
|
|
;
|
|
|
|
|
2006-11-22 18:54:02 +01:00
|
|
|
DEFINES = ;
|
|
|
|
LIBS = ;
|
|
|
|
|
2007-04-26 00:23:44 +02:00
|
|
|
if [ os.name ] = CYGWIN || [ os.name ] = NT
|
2006-11-22 18:54:02 +01:00
|
|
|
{
|
2007-04-06 01:12:50 +02:00
|
|
|
lib wsock32 : : <name>wsock32 ;
|
|
|
|
lib ws2_32 : : <name>ws2_32 ;
|
2007-04-26 00:23:44 +02:00
|
|
|
LIBS += ws2_32 wsock32 ;
|
2007-04-06 01:12:50 +02:00
|
|
|
DEFINES += WIN32_LEAN_AND_MEAN ;
|
|
|
|
DEFINES += _WIN32_WINNT=0x0500 ;
|
2006-11-22 18:54:02 +01:00
|
|
|
DEFINES += __USE_W32_SOCKETS ;
|
2007-04-06 01:12:50 +02:00
|
|
|
DEFINES += WIN32 ;
|
2007-04-17 02:23:46 +02:00
|
|
|
SOURCES += file_win ;
|
2006-11-22 18:54:02 +01:00
|
|
|
}
|
2007-04-17 02:23:46 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
SOURCES += file ;
|
|
|
|
}
|
2006-11-22 18:54:02 +01:00
|
|
|
|
2007-05-04 09:46:44 +02:00
|
|
|
lib crypt : : <name>crypto ;
|
|
|
|
|
2006-09-01 05:06:00 +02:00
|
|
|
project torrent
|
|
|
|
|
|
|
|
: requirements
|
|
|
|
|
|
|
|
<include>./include
|
|
|
|
<include>./include/libtorrent
|
|
|
|
<include>./zlib
|
|
|
|
<include>$(BOOST_ROOT)
|
|
|
|
<variant>release:<define>NDEBUG
|
|
|
|
<define>BOOST_ALL_NO_LIB
|
|
|
|
<define>_FILE_OFFSET_BITS=64
|
|
|
|
<define>BOOST_THREAD_USE_LIB
|
2006-11-22 18:54:02 +01:00
|
|
|
<define>$(DEFINES)
|
2006-09-01 05:06:00 +02:00
|
|
|
<library>/boost/thread//boost_thread #/<link>static
|
|
|
|
<library>/boost/filesystem//boost_filesystem #/<link>static
|
|
|
|
<threading>multi
|
2007-04-06 01:12:50 +02:00
|
|
|
|
|
|
|
# ======= compiler settings =======
|
|
|
|
|
2006-09-01 05:06:00 +02:00
|
|
|
# these compiler settings just makes the compiler standard conforming
|
|
|
|
<toolset>msvc:<cxxflags>/Zc:wchar_t
|
|
|
|
<toolset>msvc:<cxxflags>/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
|
|
|
|
|
2006-09-01 05:06:00 +02:00
|
|
|
# this should be defined when libtorrent is built as
|
|
|
|
# a dll. It will make sure the functions and classes
|
|
|
|
# are exported (GCC 4 and msvc)
|
|
|
|
<link>shared:<define>TORRENT_BUILDING_SHARED
|
|
|
|
|
|
|
|
<link>shared:<define>TORRENT_LINKING_SHARED
|
|
|
|
|
|
|
|
: usage-requirements
|
|
|
|
|
|
|
|
<include>./include
|
2006-10-24 01:18:35 +02:00
|
|
|
<include>./include/libtorrent
|
2006-09-01 05:06:00 +02:00
|
|
|
<include>$(BOOST_ROOT)
|
|
|
|
<variant>release:<define>NDEBUG
|
|
|
|
<define>BOOST_ALL_NO_LIB
|
2006-11-22 18:54:02 +01:00
|
|
|
<define>$(DEFINES)
|
2006-09-01 05:06:00 +02:00
|
|
|
<link>shared:<define>TORRENT_LINKING_SHARED
|
|
|
|
;
|
|
|
|
|
2007-03-17 18:15:16 +01:00
|
|
|
#cpp-pch pch : include/libtorrent/pch.hpp ;
|
|
|
|
|
2003-10-23 01:00:57 +02:00
|
|
|
lib torrent
|
2004-02-04 12:00:29 +01:00
|
|
|
:
|
2007-04-17 02:23:46 +02:00
|
|
|
src/$(SOURCES).cpp
|
|
|
|
zlib/$(ZLIB_SOURCES).c
|
2004-04-17 15:27:58 +02:00
|
|
|
$(LIBS)
|
2007-03-17 18:15:16 +01:00
|
|
|
# pch
|
2006-09-01 05:06:00 +02:00
|
|
|
:
|
2007-04-17 02:23:46 +02:00
|
|
|
<dht-support>on:<source>src/$(KADEMLIA_SOURCES).cpp
|
|
|
|
<dht-support>logging:<source>src/$(KADEMLIA_SOURCES).cpp
|
2007-04-15 06:30:52 +02:00
|
|
|
<openssl>off:<source>src/sha1.cpp
|
2007-05-04 09:46:44 +02:00
|
|
|
<openssl>on:<library>crypt
|
2003-10-23 01:00:57 +02:00
|
|
|
;
|
|
|
|
|