diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2015-03-22 07:20:30 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-03-24 12:45:07 +0300 |
commit | db4e2200fc33023195b785255666c74933be8c16 (patch) | |
tree | 1af3ad67e330d8c365ded7afd26ca73422caf9fa | |
parent | 93516bb06b7d15073ce46b05093c58642ff12bff (diff) |
Avoid extensive linking on incremental build.
- Don't strip .dll files in build directory.
- Copy .lib files only if they were modified.
-rw-r--r-- | build_ffmpeg.sh | 20 | ||||
-rw-r--r-- | build_ffmpeg_msvc.sh | 6 |
2 files changed, 11 insertions, 15 deletions
diff --git a/build_ffmpeg.sh b/build_ffmpeg.sh index e99ab157..421c6cbc 100644 --- a/build_ffmpeg.sh +++ b/build_ffmpeg.sh @@ -12,6 +12,7 @@ do x64 | amd64) arch=x86_64 archdir=x64 + cross_prefix=x86_64-w64-mingw32- ;; quick) clean_build=false @@ -32,19 +33,15 @@ make_dirs() ( fi ) -strip_libs() { - if [ "${arch}" == "x86_64" ]; then - x86_64-w64-mingw32-strip lib*/*-lav-*.dll - else - strip lib*/*-lav-*.dll - fi -} - copy_libs() ( + # install -s --strip-program=${cross_prefix}strip lib*/*-lav-*.dll ../bin_${archdir} cp lib*/*-lav-*.dll ../bin_${archdir} - cp lib*/*.lib ../bin_${archdir}/lib + ${cross_prefix}strip ../bin_${archdir}/*-lav-*.dll + cp -u lib*/*.lib ../bin_${archdir}/lib + cp lib*/*-lav-*.dll ../bin_${archdir}d - cp lib*/*.lib ../bin_${archdir}d/lib + ${cross_prefix}strip ../bin_${archdir}d/*-lav-*.dll + cp -u lib*/*.lib ../bin_${archdir}d/lib ) clean() ( @@ -101,7 +98,7 @@ configure() ( EXTRA_CFLAGS="-D_WIN32_WINNT=0x0502 -DWINVER=0x0502 -I../thirdparty/include" EXTRA_LDFLAGS="" if [ "${arch}" == "x86_64" ]; then - OPTIONS="${OPTIONS} --enable-cross-compile --cross-prefix=x86_64-w64-mingw32- --target-os=mingw32" + OPTIONS="${OPTIONS} --enable-cross-compile --cross-prefix=${cross_prefix} --target-os=mingw32" EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -L../thirdparty/lib64" else OPTIONS="${OPTIONS} --cpu=i686" @@ -136,7 +133,6 @@ fi ## Only if configure succeeded, actually build if ! $clean_build || [ ${CONFIGRETVAL} -eq 0 ]; then build && - strip_libs && copy_libs fi diff --git a/build_ffmpeg_msvc.sh b/build_ffmpeg_msvc.sh index 65ae32f2..2ce9d885 100644 --- a/build_ffmpeg_msvc.sh +++ b/build_ffmpeg_msvc.sh @@ -29,9 +29,9 @@ make_dirs() ( ) copy_libs() ( - cp lib*/*-lav-*.dll ../bin_${archdir}d - cp lib*/*-lav-*.pdb ../bin_${archdir}d - cp lib*/*.lib ../bin_${archdir}d/lib + cp -u lib*/*-lav-*.dll ../bin_${archdir}d + cp -u lib*/*-lav-*.pdb ../bin_${archdir}d + cp -u lib*/*.lib ../bin_${archdir}d/lib ) clean() ( |