import os ; import feature : feature ; BOOST_ROOT = [ os.environ BOOST_ROOT ] ; ECHO "BOOST_ROOT = "$(BOOST_ROOT) ; if ! $(BOOST_ROOT) { EXIT "You need to define BOOST_ROOT" ; } OPENSSL_ROOT = [ os.environ OPENSSL_ROOT ] ; ECHO "OPENSSL_ROOT = "$(OPENSSL_ROOT) ; if ! $(OPENSSL_ROOT) { EXIT "You need to define OPENSSL_ROOT" ; } LIBTORRENT_ROOT = [ os.environ LIBTORRENT_ROOT ] ; ECHO "LIBTORRENT_ROOT = "$(LIBTORRENT_ROOT) ; if ! $(LIBTORRENT_ROOT) { EXIT "You need to define LIBTORRENT_ROOT" ; } use-project /torrent : $(LIBTORRENT_ROOT) ; rule libtorrent_linking ( properties * ) { local result ; result += off ; result += on ; result += openssl ; result += off ; result += off ; if freebsd in $(properties) { result += /torrent//torrent/shared ; } else { result += /torrent//torrent/static ; } return $(result) ; } feature iostream : off on : composite propagated link-incompatible ; feature.compose off : BOOST_NO_IOSTREAM ; feature o2 : off s1 s2 : composite propagated link-incompatible ; feature.compose s1 : -Os ; feature.compose s2 : -Oz ; # feature lto : on gold : composite propagated link-incompatible ; # feature.compose on : -flto -flto ; # feature.compose gold : -flto -flto # -fuse-ld=gold ; feature ssl : on off : composite propagated link-incompatible ; feature.compose on : $(OPENSSL_ROOT)/include $(OPENSSL_ROOT)/lib ; lib jlibtorrent : # sources libtorrent_jni.cpp : # requirements @libtorrent_linking . # o2 darwin:s1 android:s1 linux:s1 windows:s1 # lto # darwin:off # android:off # linux:off # windows:off space : # default build shared : # usage-requirements . ;