Commit 3afe8477 authored by Jerome Wu's avatar Jerome Wu

Optimize build scripts to reduce build time

parent cc8a08ed
......@@ -9,10 +9,11 @@ CONF_FLAGS=(
--prefix=$BUILD_DIR # install library in a build directory for FFmpeg to include
--host=i686-linux # use i686 linux
--disable-shared # disable shared library
--disable-dependency-tracking # speedup one-time build
)
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && \
emconfigure ./autogen.sh && \
CFLAGS=$CFLAGS emconfigure ./configure "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
CFLAGS=$CFLAGS emconfigure ./configure -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -13,6 +13,6 @@ CONF_FLAGS=(
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && \
emconfigure ./autogen.sh && \
CFLAGS=$CFLAGS emconfigure ./configure "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
CFLAGS=$CFLAGS emconfigure ./configure -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -17,6 +17,6 @@ CONF_FLAGS=(
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && \
emconfigure ./autogen.sh && \
CFLAGS=$CFLAGS emconfigure ./configure "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
CFLAGS=$CFLAGS emconfigure ./configure -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -14,6 +14,6 @@ CONF_FLAGS=(
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && \
emconfigure ./autogen.sh && \
CFLAGS=$CFLAGS emconfigure ./configure "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
CFLAGS=$CFLAGS emconfigure ./configure -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -11,8 +11,10 @@ CONF_FLAGS=(
--disable-shared # disable shared library
--disable-frontend # exclude lame executable
--disable-analyzer-hooks # exclude analyzer hooks
--disable-dependency-tracking # speed up one-time build
--disable-gtktest
)
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && CFLAGS=$CFLAGS emconfigure ./configure "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -14,6 +14,6 @@ CONF_FLAGS=(
--disable-require-system-font-provider
)
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && ./autogen.sh && EM_PKG_CONFIG_PATH=$EM_PKG_CONFIG_PATH emconfigure ./configure "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
(cd $LIB_PATH && ./autogen.sh && EM_PKG_CONFIG_PATH=$EM_PKG_CONFIG_PATH emconfigure ./configure -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -13,10 +13,11 @@ CONF_FLAGS=(
--disable-tools # not to build tools
--disable-docs # not to build docs
--disable-unit-tests # not to do unit tests
--disable-dependency-tracking # speed up one-time build
--extra-cflags="$FLAGS" # flags to use pthread and code optimization
--extra-cxxflags="$FLAGS" # flags to use pthread and code optimization
)
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && LDFLAGS="$FLAGS" STRIP="llvm-strip" emconfigure ./configure "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -28,6 +28,6 @@ cd $LIB_PATH
mkdir -p build
cd build
emmake cmake .. -DCMAKE_C_FLAGS="$CXXFLAGS" ${CM_FLAGS[@]}
emmake make clean
emmake make install
emmake make clean
cd $ROOT_DIR
......@@ -9,10 +9,12 @@ CONF_FLAGS=(
--prefix=$BUILD_DIR # install library in a build directory for FFmpeg to include
--host=i686-linux # use i686 linux
--disable-shared # disable shared library
--disable-dependency-tracking # speed up one-time build
--disable-maintainer-mode
)
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && \
emconfigure ./autogen.sh && \
CFLAGS=$CFLAGS emconfigure ./configure "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
CFLAGS=$CFLAGS emconfigure ./configure -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -18,6 +18,6 @@ CONF_FLAGS=(
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && \
emconfigure ./autogen.sh && \
CFLAGS=$CFLAGS emconfigure ./configure "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
CFLAGS=$CFLAGS emconfigure ./configure -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -21,6 +21,6 @@ CONF_FLAGS=(
)
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && \
CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS emconfigure ./autogen.sh "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS emconfigure ./autogen.sh -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -14,12 +14,11 @@ CONF_FLAGS=(
--enable-examples=no
--enable-fast-install=no
--disable-oggtest # disable oggtests
--disable-dependency-tracking # speed up one-time build
)
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && \
emconfigure ./autogen.sh && \
CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS emconfigure ./configure "${CONF_FLAGS[@]}")
# (cd $LIB_PATH && \
# CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS emconfigure ./autogen.sh "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS emconfigure ./configure -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -15,8 +15,10 @@ CONF_FLAGS=(
--disable-dsd # disalbe legacy
--enable-legacy # enable compability for old version of wav
--disable-shared # enable building static library
--disable-dependency-tracking # speed up one-time build
--disable-maintainer-mode
)
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && CFLAGS=$CFLAGS emconfigure ./autogen.sh "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
(cd $LIB_PATH && CFLAGS=$CFLAGS emconfigure ./autogen.sh -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install -j
emmake make -C $LIB_PATH clean
......@@ -13,6 +13,6 @@ CONF_FLAGS=(
--extra-cflags="-c -s USE_PTHREADS=1 $OPTIM_FLAGS" # flags to use pthread and code optimization
)
echo "CONF_FLAGS=${CONF_FLAGS[@]}"
(cd $LIB_PATH && emconfigure ./configure "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH clean
(cd $LIB_PATH && emconfigure ./configure -C "${CONF_FLAGS[@]}")
emmake make -C $LIB_PATH install-lib-static -j
emmake make -C $LIB_PATH clean
......@@ -68,4 +68,8 @@ EOF
cp libx265.a $BUILD_DIR/lib
emmake make -C . clean
emmake make -C ../10bit clean
emmake make -C ../12bit clean
cd $ROOT_DIR
......@@ -9,6 +9,7 @@ CM_FLAGS=(
-DCMAKE_INSTALL_PREFIX=$BUILD_DIR
-DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN_FILE
-DBUILD_SHARED_LIBS=OFF
-DSKIP_INSTALL_FILES=ON
)
echo "CM_FLAGS=${CM_FLAGS[@]}"
......@@ -17,6 +18,6 @@ rm -rf build zconf.h
mkdir -p build
cd build
emmake cmake .. -DCMAKE_C_FLAGS="$CXXFLAGS" ${CM_FLAGS[@]}
emmake make clean
emmake make install
emmake make clean
cd $ROOT_DIR
......@@ -21,7 +21,6 @@ FLAGS=(
--enable-libwebp # enable libwebp
--enable-libass # enable libass
--enable-libfribidi # enable libfribidi
# --enable-filter=subtitles,overlay
# --enable-libaom # enable libaom
)
echo "FFMPEG_CONFIG_FLAGS=${FLAGS[@]}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment