|
|
@ -13,7 +13,7 @@ USE_IPV6:=0 |
|
|
|
|
|
|
|
|
|
|
|
LINK:=$(CXX) |
|
|
|
LINK:=$(CXX) |
|
|
|
|
|
|
|
|
|
|
|
DEFS=-DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 |
|
|
|
DEFS=-DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -DBOOST_THREAD_USE_LIB |
|
|
|
|
|
|
|
|
|
|
|
DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH)) |
|
|
|
DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH)) |
|
|
|
LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH)) |
|
|
|
LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH)) |
|
|
@ -21,7 +21,7 @@ LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH)) |
|
|
|
TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) |
|
|
|
TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) |
|
|
|
|
|
|
|
|
|
|
|
LMODE = static |
|
|
|
LMODE = static |
|
|
|
LMODE2 = static |
|
|
|
LMODE2 = dynamic |
|
|
|
ifdef STATIC |
|
|
|
ifdef STATIC |
|
|
|
LMODE = static |
|
|
|
LMODE = static |
|
|
|
ifeq (${STATIC}, all) |
|
|
|
ifeq (${STATIC}, all) |
|
|
@ -31,17 +31,6 @@ else |
|
|
|
TESTDEFS += -DBOOST_TEST_DYN_LINK |
|
|
|
TESTDEFS += -DBOOST_TEST_DYN_LINK |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
# for boost 1.37, add -mt to the boost libraries |
|
|
|
|
|
|
|
LIBS += \ |
|
|
|
|
|
|
|
-Wl,-B$(LMODE) \ |
|
|
|
|
|
|
|
-l boost_system$(BOOST_LIB_SUFFIX) \ |
|
|
|
|
|
|
|
-l boost_filesystem$(BOOST_LIB_SUFFIX) \ |
|
|
|
|
|
|
|
-l boost_program_options$(BOOST_LIB_SUFFIX) \ |
|
|
|
|
|
|
|
-l boost_thread$(BOOST_LIB_SUFFIX) \ |
|
|
|
|
|
|
|
-l db_cxx$(BDB_LIB_SUFFIX) \ |
|
|
|
|
|
|
|
-l ssl \ |
|
|
|
|
|
|
|
-l crypto \ |
|
|
|
|
|
|
|
-l rt |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TESTLIBS += \ |
|
|
|
TESTLIBS += \ |
|
|
|
-Wl,-B$(LMODE) \ |
|
|
|
-Wl,-B$(LMODE) \ |
|
|
@ -59,11 +48,6 @@ ifneq (${USE_IPV6}, -) |
|
|
|
DEFS += -DUSE_IPV6=$(USE_IPV6) |
|
|
|
DEFS += -DUSE_IPV6=$(USE_IPV6) |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
LIBS+= \ |
|
|
|
|
|
|
|
-Wl,-B$(LMODE2) \ |
|
|
|
|
|
|
|
-l z \ |
|
|
|
|
|
|
|
-l dl \ |
|
|
|
|
|
|
|
-l pthread |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Hardening |
|
|
|
# Hardening |
|
|
@ -179,6 +163,27 @@ DEFS += -DBOOST_ASIO_SEPARATE_COMPILATION |
|
|
|
@echo "Building libtorrent ..." && cd ../libtorrent && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" && cd ../src |
|
|
|
@echo "Building libtorrent ..." && cd ../libtorrent && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" && cd ../src |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# for boost 1.37, add -mt to the boost libraries |
|
|
|
|
|
|
|
LIBS += \ |
|
|
|
|
|
|
|
-Wl,-B$(LMODE) \ |
|
|
|
|
|
|
|
-Wl,--entry=main,-rpath-link=$(SYSROOT)/usr/lib/ -L$(SYSROOT)/usr/lib/ \ |
|
|
|
|
|
|
|
-L$(BOOSTDIR)/lib \ |
|
|
|
|
|
|
|
-l boost_system$(BOOST_LIB_SUFFIX) \ |
|
|
|
|
|
|
|
-l boost_filesystem$(BOOST_LIB_SUFFIX) \ |
|
|
|
|
|
|
|
-l boost_program_options$(BOOST_LIB_SUFFIX) \ |
|
|
|
|
|
|
|
-l boost_thread$(BOOST_LIB_SUFFIX) \ |
|
|
|
|
|
|
|
-l db_cxx$(BDB_LIB_SUFFIX) \ |
|
|
|
|
|
|
|
-L$(NDK_BASE)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/ -lgnustl_static |
|
|
|
|
|
|
|
# -l ssl_static \ |
|
|
|
|
|
|
|
# -l crypto_static \ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LIBS+= \ |
|
|
|
|
|
|
|
-Wl,-B$(LMODE2) \ |
|
|
|
|
|
|
|
-Wl,--entry=main,-rpath-link=$(SYSROOT)/usr/lib/ -L$(SYSROOT)/usr/lib/ \ |
|
|
|
|
|
|
|
-lssl -lcrypto -lstdc++ -lm -lgcc -nostdlib -lc \ |
|
|
|
|
|
|
|
$(NDK_BASE)/platforms/android-9/arch-arm/usr/lib/crtbegin_static.o |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# auto-generated dependencies: |
|
|
|
# auto-generated dependencies: |
|
|
|
-include obj/*.P |
|
|
|
-include obj/*.P |
|
|
|
-include obj-test/*.P |
|
|
|
-include obj-test/*.P |
|
|
|