forked from premiere/premiere-libtorrent
126 lines
2.5 KiB
Plaintext
Executable File
126 lines
2.5 KiB
Plaintext
Executable File
#This Jamfile requires boost-build v2 to build.
|
|
|
|
import modules ;
|
|
import os ;
|
|
import errors ;
|
|
|
|
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) ;
|
|
|
|
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
|
|
<library>/boost/thread//boost_thread #/<link>static
|
|
<library>/boost/filesystem//boost_filesystem #/<link>static
|
|
<library>/boost/date_time//boost_date_time #/<link>static
|
|
<threading>multi
|
|
<toolset>msvc:<define>_WIN32_WINNT=0x0500
|
|
# WIN32 makes sure the win32 socket api is used
|
|
# instead of win16
|
|
<toolset>msvc:<define>WIN32
|
|
# without WIN32_LEAN_AND_MEAN there will be conflicts between
|
|
# winsock.h and winsock2.h
|
|
<toolset>msvc:<define>WIN32_LEAN_AND_MEAN
|
|
# these compiler settings just makes the compiler standard conforming
|
|
<toolset>msvc:<cxxflags>/Zc:wchar_t
|
|
<toolset>msvc:<cxxflags>/Zc:forScope
|
|
# 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
|
|
|
|
: usage-requirements
|
|
|
|
<include>./include
|
|
<include>$(BOOST_ROOT)
|
|
<variant>release:<define>NDEBUG
|
|
<define>BOOST_ALL_NO_LIB
|
|
<link>shared:<define>TORRENT_LINKING_SHARED
|
|
|
|
;
|
|
|
|
SOURCES =
|
|
allocate_resources.cpp
|
|
alert.cpp
|
|
entry.cpp
|
|
escape_string.cpp
|
|
file.cpp
|
|
identify_client.cpp
|
|
ip_filter.cpp
|
|
peer_connection.cpp
|
|
bt_peer_connection.cpp
|
|
web_peer_connection.cpp
|
|
piece_picker.cpp
|
|
policy.cpp
|
|
session.cpp
|
|
stat.cpp
|
|
storage.cpp
|
|
torrent.cpp
|
|
torrent_handle.cpp
|
|
torrent_info.cpp
|
|
tracker_manager.cpp
|
|
http_tracker_connection.cpp
|
|
udp_tracker_connection.cpp
|
|
sha1.cpp
|
|
;
|
|
|
|
ZLIB_SOURCES =
|
|
adler32.c
|
|
compress.c
|
|
crc32.c
|
|
deflate.c
|
|
gzio.c
|
|
infback.c
|
|
inffast.c
|
|
inflate.c
|
|
inftrees.c
|
|
trees.c
|
|
uncompr.c
|
|
zutil.c
|
|
;
|
|
|
|
LIBS = ;
|
|
|
|
# some windows specific settings
|
|
|
|
if [ os.name ] = NT
|
|
{
|
|
lib wsock32 : : <name>wsock32.lib ;
|
|
LIBS += wsock32 ;
|
|
}
|
|
|
|
variant release_vlog : release : <define>TORRENT_VERBOSE_LOGGING ;
|
|
variant release_log : release : <define>TORRENT_LOGGING ;
|
|
variant debug_vlog : debug : <define>TORRENT_VERBOSE_LOGGING ;
|
|
variant debug_log : debug : <define>TORRENT_LOGGING ;
|
|
|
|
|
|
lib torrent
|
|
:
|
|
src/$(SOURCES)
|
|
zlib/$(ZLIB_SOURCES)
|
|
$(LIBS)
|
|
;
|
|
|
|
|