premiere-libtorrent/Jamfile

277 lines
6.1 KiB
Plaintext
Raw Normal View History

# 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 ;
import feature : feature ;
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 ] ;
if $(BOOST_ROOT)
2005-01-11 03:13:07 +01:00
{
use-project /boost : $(BOOST_ROOT) ;
2005-01-11 03:13:07 +01:00
}
# rule for linking the correct libraries depending
# on features and target-os
rule linking ( properties * )
{
local result ;
# openssl libraries, if enabled
if <openssl>sha-1 in $(properties) || <openssl>pe in $(properties)
{
if <target-os>windows in $(properties)
{
result += <library>ssleay32
<library>libeay32
<library>advapi32
<library>user32
<library>shell32
<library>gdi32
;
}
else
{
result += <library>crypto ;
}
}
# socket functions on windows require winsock libraries
if <target-os>windows in $(properties) || <target-os>cygwin in $(properties)
{
result += <library>ws2_32
<library>wsock32
<define>WIN32_LEAN_AND_MEAN
<define>_WIN32_WINNT=0x0500
<define>__USE_W32_SOCKETS
<define>WIN32
<define>_WIN32
;
}
# clock_gettime on linux requires librt
if <target-os>linux in $(properties)
{
# when do one need to link against librt?
# result += <library>rt ;
}
if <boost>system in $(properties)
{
result += <library>filesystem
<library>thread
;
}
if <boost>source in $(properties)
{
result += <library>/boost/thread//boost_thread
<library>/boost/filesystem//boost_filesystem
<include>$(BOOST_ROOT)
<define>BOOST_ALL_NO_LIB
;
}
return $(result) ;
}
# rule for adding the right source files
# depending on target-os and features
rule building ( properties * )
{
local result ;
if <openssl>off in $(properties)
{
result += <source>src/sha1.cpp ;
}
else
{
if <openssl>pe in $(properties)
{
result += <source>src/pe_crypto.cpp ;
}
}
if <target-os>windows in $(properties)
{
result += <source>src/file_win.cpp ;
}
else
{
result += <source>src/file.cpp ;
}
return $(result) ;
}
2004-03-17 13:14:44 +01: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
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
feature openssl : pe sha-1 off : composite propagated symmetric link-incompatible ;
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-05-14 00:09:25 +02:00
feature resolve-countries : on off : composite propagated symmetric 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 ;
feature zlib : shipped system : composite propagated link-incompatible ;
feature.compose <zlib>shipped : ;
feature.compose <zlib>system : ;
2007-06-06 02:41:20 +02:00
2007-05-14 00:09:25 +02:00
feature statistics : off on : composite propagated symmetric link-incompatible ;
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 ;
feature boost : system source : link-incompatible propagated ;
# 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 ;
local library-search-path = <search>/opt/local/lib <search>/usr/lib <search>/usr/local/lib <search>/sw/lib ;
lib filesystem : : <name>boost_filesystem $(library-search-path) ;
lib thread : : <name>boost_thread $(library-search-path) ;
# openssl on linux/bsd/macos etc.
lib crypto : : <name>crypto ;
# time functions used on linux require librt
lib librt : : <name>rt ;
# libz
lib zlib-target : : <name>z ;
# socket libraries on windows
lib wsock32 : : <name>wsock32 ;
lib ws2_32 : : <name>ws2_32 ;
SOURCES =
allocate_resources
alert
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
2007-05-31 01:35:14 +02:00
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
2007-06-10 22:46:09 +02:00
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
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 =
adler32
compress
crc32
deflate
gzio
infback
inffast
inflate
inftrees
trees
uncompr
zutil
2004-03-28 19:45:37 +02:00
;
local usage-requirements =
<include>./include
<include>./include/libtorrent
2007-06-06 02:41:20 +02:00
<zlib>shipped:<include>./zlib
<variant>release:<define>NDEBUG
<define>_FILE_OFFSET_BITS=64
<define>BOOST_MULTI_INDEX_DISABLE_SERIALIZATION
<conditional>@linking
<zlib>system:<library>zlib-target
# 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
;
project torrent ;
lib torrent
: # sources
src/$(SOURCES).cpp
: # requirements
<define>BOOST_THREAD_USE_LIB
<threading>multi
<link>shared:<define>TORRENT_BUILDING_SHARED
<dht-support>on:<source>src/$(KADEMLIA_SOURCES).cpp
<dht-support>logging:<source>src/$(KADEMLIA_SOURCES).cpp
2007-06-06 02:41:20 +02:00
<zlib>shipped:<source>zlib/$(ZLIB_SOURCES).c
<conditional>@building
$(usage-requirements)
: # default build
<link>static
: # usage requirements
$(usage-requirements)
;