fixing android build

This commit is contained in:
Miguel Freitas 2013-10-19 16:09:57 -03:00
parent 15d7fd07b0
commit 5f3731bab3
2 changed files with 7 additions and 9 deletions

View File

@ -166,23 +166,21 @@ DEFS += -DBOOST_ASIO_SEPARATE_COMPILATION
# 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/ \
-Wl,-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 \
-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/ \
-Wl,-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
$(NDK_BASE)/platforms/android-9/arch-arm/usr/lib/crtbegin_dynamic.o
# auto-generated dependencies:
-include obj/*.P
@ -202,6 +200,7 @@ obj/%.o: %.cpp
twisterd: $(OBJS:obj/%=obj/%)
$(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
arm-linux-androideabi-strip -g $@
TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))

View File

@ -9,8 +9,7 @@ export CXX=arm-linux-androideabi-gcc
export CXXFLAGS="-I$SYSROOT/usr/include/ -I$BOOSTDIR/include/boost-1_49 \
-I$NDK_BASE/sources/cxx-stl/gnu-libstdc++/4.6/include \
-I$NDK_BASE/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include \
-fexceptions -frtti -DHAVE_CXX_STDHEADERS -DANDROID -nostdlib \
-fno-use-cxa-atexit"
-fexceptions -frtti -DHAVE_CXX_STDHEADERS -DANDROID -nostdlib"
export BOOST_LIB_SUFFIX=-gcc-mt-1_49
export BDB_LIB_SUFFIX=-4.8