# This Jamfile requires boost-build v2 to build. # The version shipped with boost 1.34.0 import modules ; import os ; import errors ; import feature : feature ; 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) ; # rule for linking the correct library when using openssl rule link-openssl ( properties * ) { local result ; if sha-1 in $(properties) || pe in $(properties) { if [ os.name ] = NT { result += ssleay libeay ; } else { result += crypto ; } } return $(result) ; } # rule for adding the right source files when using openssl and/or PE rule use-openssl ( properties * ) { local result ; if off in $(properties) { result += src/sha1.cpp ; } else { if pe in $(properties) { result += src/pe_crypto.cpp ; } } return $(result) ; } feature logging : none default verbose : composite propagated symmetric link-incompatible ; feature.compose default : TORRENT_LOGGING ; feature.compose verbose : TORRENT_VERBOSE_LOGGING ; feature dht-support : on off logging : composite propagated symmetric link-incompatible ; feature.compose off : TORRENT_DISABLE_DHT ; feature.compose logging : TORRENT_DHT_VERBOSE_LOGGING ; feature openssl : pe sha-1 off : composite propagated symmetric link-incompatible ; feature.compose pe : TORRENT_USE_OPENSSL ; feature.compose sha-1 : TORRENT_USE_OPENSSL TORRENT_DISABLE_ENCRYPTION ; feature.compose off : TORRENT_DISABLE_ENCRYPTION ; feature resolve-countries : on off : composite propagated symmetric link-incompatible ; feature.compose off : TORRENT_DISABLE_RESOLVE_COUNTRIES ; feature character-set : ansi unicode : composite propagated link-incompatible ; feature.compose unicode : _UNICODE UNICODE ; feature zlib : shipped system : composite propagated link-incompatible ; feature.compose shipped : ; feature.compose system : ; feature statistics : off on : composite propagated symmetric link-incompatible ; feature.compose on : TORRENT_STATS ; feature upnp-logging : off on : composite propagated link-incompatible ; feature.compose on : TORRENT_UPNP_LOGGING ; lib ssleay : : ssleay32 ; lib libeay : : libeay32 ; lib crypto : : crypto ; lib zlib-target : : z ; 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 socks4_stream 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 disk_io_thread ; 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 ; local defines ; local libs ; if [ os.name ] = CYGWIN || [ os.name ] = NT { lib wsock32 : : wsock32 ; lib ws2_32 : : ws2_32 ; libs += ws2_32 wsock32 ; defines += WIN32_LEAN_AND_MEAN ; defines += _WIN32_WINNT=0x0500 ; defines += __USE_W32_SOCKETS ; defines += WIN32 ; defines += _WIN32 ; SOURCES += file_win ; } else { SOURCES += file ; } local usage-requirements = ./include ./include/libtorrent shipped:./zlib $(BOOST_ROOT) release:NDEBUG BOOST_ALL_NO_LIB _FILE_OFFSET_BITS=64 $(defines) /boost/thread//boost_thread #/static /boost/filesystem//boost_filesystem #/static @link-openssl system:zlib-target # these compiler settings just makes the compiler standard conforming msvc:/Zc:wchar_t msvc:/Zc:forScope # disable bogus deprecation warnings on msvc8 msvc:_SCL_SECURE_NO_DEPRECATE msvc:_CRT_SECURE_NO_DEPRECATE ; lib torrent : # sources src/$(SOURCES).cpp $(libs) : # requirements BOOST_THREAD_USE_LIB multi shared:TORRENT_BUILDING_SHARED on:src/$(KADEMLIA_SOURCES).cpp logging:src/$(KADEMLIA_SOURCES).cpp shipped:zlib/$(ZLIB_SOURCES).c @use-openssl $(usage-requirements) : # default build static : # usage requirements $(usage-requirements) ;