forked from premiere/premiere-libtorrent
185 lines
3.9 KiB
Plaintext
Executable File
185 lines
3.9 KiB
Plaintext
Executable File
#This Jamfile requires boost-build v2 to build.
|
|
|
|
import modules ;
|
|
import os ;
|
|
import errors ;
|
|
import feature : feature ;
|
|
#import pch ;
|
|
|
|
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
|
|
|
|
ECHO "BOOST_ROOT =" $(BOOST_ROOT) ;
|
|
ECHO "OS =" [ os.name ] ;
|
|
|
|
if ! $(BOOST_ROOT)
|
|
{
|
|
errors.user-error
|
|
"BOOST_ROOT must be set to your boost installation path." ;
|
|
}
|
|
|
|
use-project /boost : $(BOOST_ROOT) ;
|
|
|
|
|
|
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 ;
|
|
|
|
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 ;
|
|
|
|
feature openssl : off on : composite propagated symmetric link-incompatible ;
|
|
feature.compose <openssl>on : <define>TORRENT_USE_OPENSSL ;
|
|
|
|
feature resolve-countries : on off : composite propagated link-incompatible ;
|
|
feature.compose <resolve-countries>off : <define>TORRENT_DISABLE_RESOLVE_COUNTRIES ;
|
|
|
|
feature character-set : ansi unicode : composite propagated link-incompatible ;
|
|
feature.compose <character-set>unicode : <define>_UNICODE <define>UNICODE ;
|
|
|
|
SOURCES =
|
|
allocate_resources
|
|
alert
|
|
bandwidth_manager
|
|
connection_queue
|
|
entry
|
|
escape_string
|
|
http_connection
|
|
http_stream
|
|
identify_client
|
|
ip_filter
|
|
peer_connection
|
|
bt_peer_connection
|
|
web_peer_connection
|
|
instantiate_connection
|
|
natpmp
|
|
piece_picker
|
|
policy
|
|
session
|
|
session_impl
|
|
socks5_stream
|
|
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
|
|
;
|
|
|
|
KADEMLIA_SOURCES =
|
|
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
|
|
;
|
|
|
|
ZLIB_SOURCES =
|
|
adler32
|
|
compress
|
|
crc32
|
|
deflate
|
|
gzio
|
|
infback
|
|
inffast
|
|
inflate
|
|
inftrees
|
|
trees
|
|
uncompr
|
|
zutil
|
|
;
|
|
|
|
DEFINES = ;
|
|
LIBS = ;
|
|
|
|
if [ os.name ] = CYGWIN || [ os.name ] = NT
|
|
{
|
|
lib wsock32 : : <name>wsock32 ;
|
|
lib ws2_32 : : <name>ws2_32 ;
|
|
LIBS += ws2_32 wsock32 ;
|
|
DEFINES += WIN32_LEAN_AND_MEAN ;
|
|
DEFINES += _WIN32_WINNT=0x0500 ;
|
|
DEFINES += __USE_W32_SOCKETS ;
|
|
DEFINES += WIN32 ;
|
|
SOURCES += file_win ;
|
|
}
|
|
else
|
|
{
|
|
SOURCES += file ;
|
|
}
|
|
|
|
lib crypt : : <name>crypto ;
|
|
|
|
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
|
|
<define>$(DEFINES)
|
|
<library>/boost/thread//boost_thread #/<link>static
|
|
<library>/boost/filesystem//boost_filesystem #/<link>static
|
|
<threading>multi
|
|
|
|
# ======= compiler settings =======
|
|
|
|
# these compiler settings just makes the compiler standard conforming
|
|
<toolset>msvc:<cxxflags>/Zc:wchar_t
|
|
<toolset>msvc:<cxxflags>/Zc:forScope
|
|
# disable bogus deprecation warnings on msvc8
|
|
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
|
|
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
|
|
|
|
# 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
|
|
<include>./include/libtorrent
|
|
<include>$(BOOST_ROOT)
|
|
<variant>release:<define>NDEBUG
|
|
<define>BOOST_ALL_NO_LIB
|
|
<define>$(DEFINES)
|
|
<link>shared:<define>TORRENT_LINKING_SHARED
|
|
;
|
|
|
|
#cpp-pch pch : include/libtorrent/pch.hpp ;
|
|
|
|
lib torrent
|
|
:
|
|
src/$(SOURCES).cpp
|
|
zlib/$(ZLIB_SOURCES).c
|
|
$(LIBS)
|
|
# pch
|
|
:
|
|
<dht-support>on:<source>src/$(KADEMLIA_SOURCES).cpp
|
|
<dht-support>logging:<source>src/$(KADEMLIA_SOURCES).cpp
|
|
<openssl>off:<source>src/sha1.cpp
|
|
<openssl>on:<library>crypt
|
|
;
|
|
|