|
|
|
@ -13,7 +13,7 @@ USE_IPV6:=0
@@ -13,7 +13,7 @@ USE_IPV6:=0
|
|
|
|
|
|
|
|
|
|
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)) |
|
|
|
|
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))
@@ -21,7 +21,7 @@ LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
|
|
|
|
|
TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) |
|
|
|
|
|
|
|
|
|
LMODE = static |
|
|
|
|
LMODE2 = static |
|
|
|
|
LMODE2 = dynamic |
|
|
|
|
ifdef STATIC |
|
|
|
|
LMODE = static |
|
|
|
|
ifeq (${STATIC}, all) |
|
|
|
@ -31,17 +31,6 @@ else
@@ -31,17 +31,6 @@ else
|
|
|
|
|
TESTDEFS += -DBOOST_TEST_DYN_LINK |
|
|
|
|
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 += \ |
|
|
|
|
-Wl,-B$(LMODE) \ |
|
|
|
@ -59,11 +48,6 @@ ifneq (${USE_IPV6}, -)
@@ -59,11 +48,6 @@ ifneq (${USE_IPV6}, -)
|
|
|
|
|
DEFS += -DUSE_IPV6=$(USE_IPV6) |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
LIBS+= \ |
|
|
|
|
-Wl,-B$(LMODE2) \ |
|
|
|
|
-l z \ |
|
|
|
|
-l dl \ |
|
|
|
|
-l pthread |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Hardening |
|
|
|
@ -179,6 +163,27 @@ DEFS += -DBOOST_ASIO_SEPARATE_COMPILATION
@@ -179,6 +163,27 @@ DEFS += -DBOOST_ASIO_SEPARATE_COMPILATION
|
|
|
|
|
@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: |
|
|
|
|
-include obj/*.P |
|
|
|
|
-include obj-test/*.P |
|
|
|
|