Changeset 5513 for pjproject/branches/projects/uwp/configure-android
- Timestamp:
- Dec 28, 2016 3:40:07 AM (8 years ago)
- Location:
- pjproject/branches/projects/uwp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp
- Property svn:mergeinfo changed
/pjproject/trunk (added) merged: 5209,5212-5234,5237-5253,5255,5257-5292,5294-5297,5299-5332,5334-5394,5396-5438,5440-5469,5471-5496,5498-5510
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/configure-android
r5145 r5513 62 62 IGNORE_CFLAGS="\-M\|\-f*stack\|\-f*alias" 63 63 fi 64 65 NDK_OUT=`${ANDROID_NDK_ROOT}/ndk-build -n -C ${ANDROID_NDK_ROOT}/samples/hello-jni NDK_TOOLCHAIN_VERSION=4.8 APP_PLATFORM=${APP_PLATFORM} APP_ABI=${TARGET_ABI}` 64 65 if test -f ${ANDROID_NDK_ROOT}/build/ndk-build; then 66 NDK_BUILD=${ANDROID_NDK_ROOT}/build/ndk-build 67 else 68 NDK_BUILD=${ANDROID_NDK_ROOT}/ndk-build 69 fi 70 71 NDK_OUT=`${NDK_BUILD} -n -C pjsip-apps/src/samples/android_sample APP_PLATFORM=${APP_PLATFORM} APP_ABI=${TARGET_ABI}` 66 72 if test ! "${NDK_OUT}"; then 67 73 echo "$F error: failed to run ndk-build, check ANDROID_NDK_ROOT env var" … … 73 79 74 80 # Parse NDK CXXFLAGS 75 if test "x${NDK_CXX}" != "x" -a "x`echo $i|grep ' hello-jni'`" = "x"; then81 if test "x${NDK_CXX}" != "x" -a "x`echo $i|grep 'dummy'`" = "x"; then 76 82 if test "x`echo $i|grep '\-\-sysroot='`" != "x"; then 77 83 ANDROID_SYSROOT=`echo $i|sed 's/--sysroot=//'`; … … 81 87 82 88 # Parse NDK CFLAGS 83 if test "x${NDK_CC}" != "x" -a "x`echo $i|grep ' hello-jni'`" = "x" -a "${ADD_CFLAGS}" = "1"; then89 if test "x${NDK_CC}" != "x" -a "x`echo $i|grep 'dummy'`" = "x" -a "${ADD_CFLAGS}" = "1"; then 84 90 if test "$i" = "-c"; then ADD_CFLAGS="0"; else 85 91 if test "x`echo $i|grep ${IGNORE_CFLAGS}`" = "x"; then … … 108 114 if test "x`echo ${TARGET_HOST} | grep 'linux-android'`" = "x"; then 109 115 #TARGET_HOST=`echo ${TARGET_HOST} | sed -e 's/\(.*\)\-\([0-9\.]*\)/\1-linux-android-\2/'` 110 TARGET_HOST+=-linux-android 111 fi 112 116 TARGET_HOST="${TARGET_HOST}-linux-android" 117 fi 118 119 export TARGET_ABI="${TARGET_ABI}" 113 120 export CC="${NDK_CC}" 114 121 export CXX="${NDK_CXX}" … … 116 123 export RANLIB=`echo ${NDK_CXX}|sed 's/-g++/-ranlib/'`; 117 124 118 export LDFLAGS="${LDFLAGS} - nostdlib -L${ANDROID_SYSROOT}${USR_LIB}"125 export LDFLAGS="${LDFLAGS} --sysroot=${ANDROID_SYSROOT}" 119 126 export LIBS="${LIBS} -lc -lgcc -ldl" 120 127 export CFLAGS="${NDK_CFLAGS} ${CFLAGS}" … … 144 151 fi 145 152 153 export TARGET_ABI="${TARGET_ABI}" 146 154 export CC="${ANDROID_TC}/bin/${TARGET_HOST}-gcc" 147 155 export CXX="${ANDROID_TC}/bin/${TARGET_HOST}-g++" … … 149 157 export RANLIB="${ANDROID_TC}/bin/${TARGET_HOST}-ranlib" 150 158 151 export LDFLAGS="${LDFLAGS} - nostdlib -L${ANDROID_SYSROOT}${USR_LIB}"159 export LDFLAGS="${LDFLAGS} --sysroot=${ANDROID_SYSROOT}" 152 160 export LIBS="${LIBS} -lc -lgcc" 153 export CFLAGS="${CFLAGS} - I${ANDROID_SYSROOT}/usr/include"161 export CFLAGS="${CFLAGS} --sysroot=${ANDROID_SYSROOT}" 154 162 export CPPFLAGS="${CFLAGS} -fexceptions -frtti" 155 163 export CXXFLAGS="${CXXFLAGS} -shared --sysroot=${ANDROID_SYSROOT} -fexceptions -frtti" … … 168 176 STDCPP_TC_VER=`ls -d ${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/[0-9]* | sort -gr | head -1` 169 177 STDCPP_CFLAGS="-I${STDCPP_TC_VER}/include -I${STDCPP_TC_VER}/libs/${TARGET_ABI}/include" 170 STDCPP_LIBS=" ${ANDROID_SYSROOT}${USR_LIB}/crtbegin_so.o-lgnustl_static"178 STDCPP_LIBS="-lgnustl_static" 171 179 STDCPP_LDFLAGS="-L${STDCPP_TC_VER}/libs/${TARGET_ABI}/" 172 180 173 181 # stlport 174 182 #STDCPP_CFLAGS="-I${ANDROID_NDK_ROOT}/sources/cxx-stl/stlport/stlport" 175 #STDCPP_LIBS=" ${ANDROID_SYSROOT}${USR_LIB}/crtbegin_so.o-lstlport_static -ldl"183 #STDCPP_LIBS="-lstlport_static -ldl" 176 184 #STDCPP_LDFLAGS="-L${ANDROID_NDK_ROOT}/sources/cxx-stl/stlport/libs/${TARGET_ABI}" 177 185 … … 192 200 echo " RANLIB = ${RANLIB}" 193 201 echo " TARGET_HOST = ${TARGET_HOST}" 202 echo " TARGET_ABI = ${TARGET_ABI}" 194 203 fi 195 204
Note: See TracChangeset
for help on using the changeset viewer.