#
# !!! It's highly recommended to install yasm before running this script.
+export LC_ALL=C
BASE_DIR=`pwd`
LIBVPX_SRC_DIR="source/libvpx"
LIBVPX_CONFIG_DIR="source/config"
done
echo " ]," >> $2
echo " 'conditions': [" >> $2
- echo " ['os_posix==1 and OS!=\"mac\"', {" >> $2
+ echo " ['os_posix==1 and OS!=\"mac\" and OS!=\"ios\"', {" >> $2
echo " 'cflags!': [ '-mfpu=vfpv3-d16' ]," >> $2
echo " 'cflags': [ '-m$4', ]," >> $2
echo " }]," >> $2
- echo " ['OS==\"mac\"', {" >> $2
+ echo " ['OS==\"mac\" or OS==\"ios\"', {" >> $2
echo " 'xcode_settings': {" >> $2
echo " 'OTHER_CFLAGS': [ '-m$4', ]," >> $2
echo " }," >> $2
echo " }]," >> $2
+ if [[ $4 == avx* ]]; then
+ echo " ['OS==\"win\"', {" >> $2
+ echo " 'msvs_settings': {" >> $2
+ echo " 'VCCLCompilerTool': {" >> $2
+ echo " 'EnableEnhancedInstructionSet': '3', # /arch:AVX" >> $2
+ echo " }," >> $2
+ echo " }," >> $2
+ echo " }]," >> $2
+ fi
echo " ]," >> $2
echo " }," >> $2
}
-o $BASE_DIR/$TEMP_DIR/libvpx.config
fi
- $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.sh \
+ $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \
--arch=$2 \
--sym=vp8_rtcd \
--config=$BASE_DIR/$TEMP_DIR/libvpx.config \
--disable-avx2 \
- $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.sh \
+ $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.pl \
> $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp8_rtcd.h
- $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.sh \
+ $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \
--arch=$2 \
--sym=vp9_rtcd \
--config=$BASE_DIR/$TEMP_DIR/libvpx.config \
--disable-avx2 \
- $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.sh \
+ $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.pl \
> $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp9_rtcd.h
- $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.sh \
+ $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \
--arch=$2 \
--sym=vpx_scale_rtcd \
--config=$BASE_DIR/$TEMP_DIR/libvpx.config \
--disable-avx2 \
- $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.sh \
+ $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.pl \
> $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_scale_rtcd.h
rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config
cd $TEMP_DIR
echo "Generate Config Files"
+# TODO(joeyparrish) Enable AVX2 when broader VS2013 support is available
all_platforms="--enable-external-build --enable-postproc --disable-install-srcs --enable-multi-res-encoding --enable-temporal-denoising --disable-unit-tests --disable-install-docs --disable-examples --disable-avx2"
gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pic --enable-realtime-only ${all_platforms}"
gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable-pic --enable-realtime-only ${all_platforms}"
gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-pic --enable-realtime-only --enable-runtime-cpu-detect ${all_platforms}"
gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligned ${all_platforms}"
gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realtime-only ${all_platforms}"
-gen_config_files win/ia32 "--target=x86-win32-vs7 --enable-realtime-only ${all_platforms}"
-gen_config_files win/x64 "--target=x86_64-win64-vs9 --enable-realtime-only ${all_platforms}"
+gen_config_files win/ia32 "--target=x86-win32-vs12 --enable-realtime-only ${all_platforms}"
+gen_config_files win/x64 "--target=x86_64-win64-vs12 --enable-realtime-only ${all_platforms}"
gen_config_files mac/ia32 "--target=x86-darwin9-gcc --enable-pic --enable-realtime-only ${all_platforms}"
gen_config_files mac/x64 "--target=x86_64-darwin9-gcc --enable-pic --enable-realtime-only ${all_platforms}"
gen_config_files nacl "--target=generic-gnu --enable-pic --enable-realtime-only ${all_platforms}"