3 ## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
5 ## Use of this source code is governed by a BSD-style license
6 ## that can be found in the LICENSE file in the root of the source
7 ## tree. An additional intellectual property rights grant can be found
8 ## in the file PATENTS. All contributing project authors may
9 ## be found in the AUTHORS file in the root of the source tree.
20 *) echo "Unsupported option $opt"; exit 1;;
25 cat > release.mk
<< EOF
26 %\$(BUILD_SFX).tar.bz2: %/.done
27 ${TAB}@echo "\$(subst .tar.bz2,,\$@): tarball"
28 ${TAB}@cd \$(dir \$<); tar -cf - \$(subst .tar.bz2,,\$@) | bzip2 > ../\$@
30 %\$(BUILD_SFX).zip: %/.done
31 ${TAB}@echo "\$(subst .zip,,\$@): zip"
32 ${TAB}@rm -f \$@; cd \$(dir \$<); zip -rq ../\$@ \$(subst .zip,,\$@)
34 logs/%\$(BUILD_SFX).log.bz2: %/.done
35 ${TAB}@echo "\$(subst .log.bz2,,\$(notdir \$@)): tarlog"
37 ${TAB}@cat \$< | bzip2 > \$@
40 ${TAB}@mkdir -p \$(dir \$@)
41 ${TAB}@echo "\$(dir \$@): configure \$(CONFIG_OPTS) \$(EXTRA_PATH)"
42 ${TAB}@cd \$(dir \$@); export PATH=\$\$PATH\$(EXTRA_PATH); ../\$(SRC_ROOT)/configure \$(CONFIG_OPTS) >makelog.txt 2>&1
43 ${TAB}@echo "\$(dir \$@): make"
44 ${TAB}@cd \$(dir \$@); PATH=\$\$PATH\$(EXTRA_PATH) \$(MAKE) >>makelog.txt 2>&1
45 ${TAB}@echo "\$(dir \$@): test install"
46 ${TAB}@cd \$(dir \$@); PATH=\$\$PATH\$(EXTRA_PATH) \$(MAKE) install >>makelog.txt 2>&1
47 ${TAB}@cd \$(dir \$@)/dist/build; PATH=\$\$PATH\$(EXTRA_PATH) \$(MAKE) >>makelog.txt 2>&1
48 ${TAB}@echo "\$(dir \$@): install"
49 ${TAB}@cd \$(dir \$@); PATH=\$\$PATH\$(EXTRA_PATH) \$(MAKE) install DIST_DIR=\$(TGT) >>makelog.txt 2>&1
52 #include release-deps.mk
55 #[ -f release-deps.mk ] || \
56 # find ${self%/*} -name .git -prune -o -type f -print0 \
57 # | xargs -0 -n1 echo \
58 # | sed -e 's; ;\\ ;g' | awk '{print "$(TGT)/.done: "$0}' > release-deps.mk
61 for codec
in $CODEC_LIST; do
62 for arch
in $ARCH_LIST; do
63 if [ -n "$OS_LIST" ]; then
64 for os
in $OS_LIST; do
65 CONFIGS
="$CONFIGS vpx-${codec}-${arch}-${os}"
68 CONFIGS
="$CONFIGS vpx-${codec}-${arch}"
74 CODEC_LIST
="vp8 vp8cx vp8dx"
77 ARCH_LIST
="x86 x86_64"
80 ARCH_LIST
="armv5te armv6 armv7"
87 for arch
in x86-win32 x86_64-win64
; do
88 for msvcrt
in md mt
; do
90 vs7
,x86_64-win64
) continue ;;
92 ARCH_LIST
="$ARCH_LIST ${arch}${msvcrt}-${vs}"
99 OS_LIST
="darwin8 darwin9"
102 ARCH_LIST
="x86 x86_64"
108 TAR_SFX
=${TAR_SFX:-.tar.bz2}
109 ARM_TOOLCHAIN
=/usr
/local
/google
/csl-2009q3-67
110 for cfg
in $CONFIGS; do
117 src-
*) opts
="$opts --enable-codec-srcs"
120 eval-
*) opts
="$opts --enable-eval-limit"
130 opts
="$opts --target=x86-linux-gcc" ;;
132 opts
="$opts --target=x86_64-linux-gcc" ;;
136 opts
="$opts --target=armv${armv}-linux-gcc" ;;
140 opts
="$opts --target=armv${armv}-linux-rvct"
141 opts
="$opts --libc=${ARM_TOOLCHAIN}/arm-none-linux-gnueabi/libc" ;;
147 # need --enable-debug-libs for now until we're smarter about
148 # building the debug/release from the customer installed
151 opts
="$opts --target=x86-win32-vs${cfg##*-vs} --enable-debug-libs";;
153 opts
="$opts --target=x86_64-win64-vs8 --enable-debug-libs" ;;
159 opts
="$opts --target=universal-darwin${cfg##*-darwin}-gcc" ;;
165 opts
="$opts --target=x86-solaris-gcc" ;;
167 opts
="$opts --target=x86_64-solaris-gcc" ;;
171 *x86-linux |
*x86-solaris
) opts
="$opts --enable-pic" ;;
175 *-win[36][24]mt
*) opts
="$opts --enable-static-msvcrt" ;;
176 *-win[36][24]md
*) opts
="$opts --disable-static-msvcrt" ;;
179 opts
="$opts --disable-codecs"
181 vp8
*) opts
="$opts --enable-vp8" ;;
184 *cx-
*) opts
="${opts}-encoder" ;;
185 *dx-
*) opts
="${opts}-decoder" ;;
187 opts
="$opts --enable-postproc"
189 [ "x${clean}" = "xyes" ] \
190 && rm -rf ${full_cfg}${BUILD_SFX}${TAR_SFX} \
191 && rm -rf logs
/${full_cfg}${BUILD_SFX}.log.bz2
193 TGT
=${full_cfg}${BUILD_SFX}
194 BUILD_TARGETS
="logs/${TGT}.log.bz2 ${TGT}${TAR_SFX}"
195 echo "${BUILD_TARGETS}: CONFIG_OPTS=$opts" >>release.mk
196 echo "${BUILD_TARGETS}: TGT=${TGT}" >>release.mk
199 echo "${BUILD_TARGETS}: EXTRA_PATH=:${ARM_TOOLCHAIN}/bin/" >>release.mk
;;
201 echo "${BUILD_TARGETS}: EXTRA_PATH=:/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ .NET\ 2003/Common7/IDE" >>release.mk
;;
203 echo "${BUILD_TARGETS}: EXTRA_PATH=:/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/Common7/IDE" >>release.mk
;;
205 MAKE_TGTS
="$MAKE_TGTS ${TGT}${TAR_SFX} logs/${TGT}.log.bz2"
209 ${MAKE:-make} ${jopt:--j3} -f release.mk \
210 SRC_ROOT
=${self%/*} BUILD_SFX=${BUILD_SFX} ${MAKE_TGTS}