Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: third_party/libvpx_new/generate_gypi.sh

Issue 1323333002: Copy libvpx from DEPS to src (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update include order and rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libvpx_new/ads2gas.gypi ('k') | third_party/libvpx_new/include/elf.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash -e
2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 # This script is used to generate .gypi, .gni files and files in the
8 # config/platform directories needed to build libvpx.
9 # Every time libvpx source code is updated just run this script.
10 #
11 # Usage:
12 # $ ./generate_gypi.sh [--disable-avx] [--only-configs]
13 #
14 # The following optional flags are supported:
15 # --disable-avx : AVX+AVX2 support is disabled.
16 # --only-configs: Excludes generation of GN and GYP files (i.e. only
17 # configuration headers are generated).
18 #
19 # !!! It's highly recommended to install yasm before running this script.
20
21 export LC_ALL=C
22 BASE_DIR=$(pwd)
23 LIBVPX_SRC_DIR="source/libvpx"
24 LIBVPX_CONFIG_DIR="source/config"
25 unset DISABLE_AVX
26
27 for i in "$@"
28 do
29 case $i in
30 --disable-avx)
31 DISABLE_AVX="--disable-avx --disable-avx2"
32 shift
33 ;;
34 --only-configs)
35 ONLY_CONFIGS=true
36 shift
37 ;;
38 *)
39 echo "Unknown option: $i"
40 exit 1
41 ;;
42 esac
43 done
44
45 # Print license header.
46 # $1 - Output base name
47 function write_license {
48 echo "# This file is generated. Do not edit." >> $1
49 echo "# Copyright (c) 2014 The Chromium Authors. All rights reserved." >> $1
50 echo "# Use of this source code is governed by a BSD-style license that can be " >> $1
51 echo "# found in the LICENSE file." >> $1
52 echo "" >> $1
53 }
54
55 # Print gypi boilerplate header.
56 # $1 - Output base name
57 function write_gypi_header {
58 echo "{" >> $1
59 }
60
61 # Print gypi boilerplate footer.
62 # $1 - Output base name
63 function write_gypi_footer {
64 echo "}" >> $1
65 }
66
67 # Generate a gypi with a list of source files.
68 # $1 - Array name for file list. This is processed with 'declare' below to
69 # regenerate the array locally.
70 # $2 - Output file
71 function write_gypi {
72 # Convert the first argument back in to an array.
73 local readonly file_list=(${!1})
74
75 rm -rf "$2"
76 write_license "$2"
77 write_gypi_header "$2"
78
79 echo " 'sources': [" >> "$2"
80 for f in ${file_list[@]}
81 do
82 echo " '<(libvpx_source)/$f'," >> "$2"
83 done
84 echo " ]," >> "$2"
85
86 write_gypi_footer "$2"
87 }
88
89 # Generate a gni with a list of source files.
90 # $1 - Array name for file list. This is processed with 'declare' below to
91 # regenerate the array locally.
92 # $2 - GN variable name.
93 # $3 - Output file.
94 function write_gni {
95 # Convert the first argument back in to an array.
96 declare -a file_list=("${!1}")
97
98 echo "$2 = [" >> "$3"
99 for f in $file_list
100 do
101 echo " \"//third_party/libvpx_new/source/libvpx/$f\"," >> "$3"
102 done
103 echo "]" >> "$3"
104 }
105
106 # Target template function
107 # $1 - Array name for file list.
108 # $2 - Output file
109 # $3 - Target name
110 # $4 - Compiler flag
111 function write_target_definition {
112 declare -a sources_list=("${!1}")
113
114 echo " {" >> "$2"
115 echo " 'target_name': '$3'," >> "$2"
116 echo " 'type': 'static_library'," >> "$2"
117 echo " 'include_dirs': [" >> "$2"
118 echo " 'source/config/<(OS_CATEGORY)/<(target_arch_full)'," >> "$2"
119 echo " '<(libvpx_source)'," >> "$2"
120 echo " ]," >> "$2"
121 echo " 'sources': [" >> "$2"
122 for f in $sources_list
123 do
124 echo " '<(libvpx_source)/$f'," >> $2
125 done
126 echo " ]," >> "$2"
127 if [[ $4 == fpu=neon ]]; then
128 echo " 'includes': [ 'ads2gas.gypi' ]," >> "$2"
129 echo " 'cflags!': [ '-mfpu=vfpv3-d16' ]," >> "$2"
130 echo " 'conditions': [" >> $2
131 echo " # Disable GCC LTO in neon targets due to compiler bug" >> "$2"
132 echo " # crbug.com/408997" >> "$2"
133 echo " ['clang==0 and use_lto==1', {" >> "$2"
134 echo " 'cflags!': [" >> "$2"
135 echo " '-flto'," >> "$2"
136 echo " '-ffat-lto-objects'," >> "$2"
137 echo " ]," >> "$2"
138 echo " }]," >> "$2"
139 echo " ]," >> "$2"
140 fi
141 echo " 'cflags': [ '-m$4', ]," >> "$2"
142 echo " 'xcode_settings': { 'OTHER_CFLAGS': [ '-m$4' ] }," >> "$2"
143 if [[ -z $DISABLE_AVX && $4 == avx2 ]]; then
144 echo " 'msvs_settings': {" >> "$2"
145 echo " 'VCCLCompilerTool': {" >> "$2"
146 echo " 'EnableEnhancedInstructionSet': '5', # /arch:AVX2" >> "$2"
147 echo " }," >> "$2"
148 echo " }," >> "$2"
149 elif [[ $4 == ssse3 || $4 == sse4.1 ]]; then
150 echo " 'conditions': [" >> "$2"
151 echo " ['OS==\"win\" and clang==1', {" >> "$2"
152 echo " # cl.exe's /arch flag doesn't have a setting for SSSE3/4, and cl.exe" >> "$2"
153 echo " # doesn't need it for intrinsics. clang-cl does need it, thoug h." >> "$2"
154 echo " 'msvs_settings': {" >> "$2"
155 echo " 'VCCLCompilerTool': { 'AdditionalOptions': [ '-m$4' ] }," >> "$2"
156 echo " }," >> "$2"
157 echo " }]," >> "$2"
158 echo " ]," >> "$2"
159 fi
160 echo " }," >> "$2"
161 }
162
163
164 # Generate a gypi which applies additional compiler flags based on the file
165 # name.
166 # $1 - Array name for file list.
167 # $2 - Output file
168 function write_intrinsics_gypi {
169 declare -a file_list=("${!1}")
170
171 local mmx_sources=$(echo "$file_list" | grep '_mmx\.c$')
172 local sse2_sources=$(echo "$file_list" | grep '_sse2\.c$')
173 local sse3_sources=$(echo "$file_list" | grep '_sse3\.c$')
174 local ssse3_sources=$(echo "$file_list" | grep '_ssse3\.c$')
175 local sse4_1_sources=$(echo "$file_list" | grep '_sse4\.c$')
176 local avx_sources=$(echo "$file_list" | grep '_avx\.c$')
177 local avx2_sources=$(echo "$file_list" | grep '_avx2\.c$')
178 local neon_sources=$(echo "$file_list" | grep '_neon\.c$\|\.asm$')
179
180 # Intrinsic functions and files are in flux. We can selectively generate them
181 # but we can not selectively include them in libvpx.gyp. Throw some errors
182 # when new targets are needed.
183
184 rm -rf "$2"
185 write_license "$2"
186 write_gypi_header "$2"
187
188 echo " 'targets': [" >> "$2"
189
190 # x86[_64]
191 if [ 0 -ne ${#mmx_sources} ]; then
192 write_target_definition mmx_sources[@] "$2" libvpx_intrinsics_mmx mmx
193 fi
194 if [ 0 -ne ${#sse2_sources} ]; then
195 write_target_definition sse2_sources[@] "$2" libvpx_intrinsics_sse2 sse2
196 fi
197 if [ 0 -ne ${#sse3_sources} ]; then
198 #write_target_definition sse3_sources[@] "$2" libvpx_intrinsics_sse3 sse3
199 echo "ERROR: Uncomment sse3 sections in libvpx.gyp"
200 exit 1
201 fi
202 if [ 0 -ne ${#ssse3_sources} ]; then
203 write_target_definition ssse3_sources[@] "$2" libvpx_intrinsics_ssse3 ssse3
204 fi
205 if [ 0 -ne ${#sse4_1_sources} ]; then
206 write_target_definition sse4_1_sources[@] "$2" libvpx_intrinsics_sse4_1 sse4 .1
207 fi
208 if [[ -z $DISABLE_AVX && 0 -ne ${#avx_sources} ]]; then
209 #write_target_definition avx_sources[@] "$2" libvpx_intrinsics_avx avx
210 echo "ERROR: Uncomment avx sections in libvpx.gyp"
211 exit 1
212 fi
213 if [[ -z $DISABLE_AVX && 0 -ne ${#avx2_sources} ]]; then
214 write_target_definition avx2_sources[@] "$2" libvpx_intrinsics_avx2 avx2
215 fi
216
217 # arm neon
218 if [ 0 -ne ${#neon_sources} ]; then
219 write_target_definition neon_sources[@] "$2" libvpx_intrinsics_neon fpu=neon
220 fi
221
222 echo " ]," >> "$2"
223
224 write_gypi_footer "$2"
225 }
226
227 # Convert a list of source files into gypi and gni files.
228 # $1 - Input file.
229 # $2 - Output gypi file base. Will generate additional .gypi files when
230 # different compilation flags are required.
231 function convert_srcs_to_project_files {
232 # Do the following here:
233 # 1. Filter .c, .h, .s, .S and .asm files.
234 # 2. Move certain files to a separate include to allow applying different
235 # compiler options.
236 # 3. Replace .asm.s to .asm because gyp will do the conversion.
237
238 local source_list=$(grep -E '(\.c|\.h|\.S|\.s|\.asm)$' $1)
239
240 # Not sure why vpx_config is not included.
241 source_list=$(echo "$source_list" | grep -v 'vpx_config\.c')
242
243 # The actual ARM files end in .asm. We have rules to translate them to .S
244 source_list=$(echo "$source_list" | sed s/\.asm\.s$/.asm/)
245
246 # Select all x86 files ending with .c
247 local intrinsic_list=$(echo "$source_list" | \
248 egrep '(mmx|sse2|sse3|ssse3|sse4|avx|avx2).c$')
249
250 # Select all neon files ending in C but only when building in RTCD mode
251 if [ "libvpx_srcs_arm_neon_cpu_detect" == "$2" ]; then
252 # Select all arm neon files ending in _neon.c and all asm files.
253 # The asm files need to be included in the intrinsics target because
254 # they need the -mfpu=neon flag.
255 # the pattern may need to be updated if vpx_scale gets intrinics
256 local intrinsic_list=$(echo "$source_list" | \
257 egrep 'neon.*(\.c|\.asm)$')
258 fi
259
260 # Remove these files from the main list.
261 source_list=$(comm -23 <(echo "$source_list") <(echo "$intrinsic_list"))
262
263 local x86_list=$(echo "$source_list" | egrep '/x86/')
264
265 write_gypi source_list "$BASE_DIR/$2.gypi"
266
267 # All the files are in a single "element." Check if the first element has
268 # length 0.
269 if [ 0 -ne ${#intrinsic_list} ]; then
270 write_intrinsics_gypi intrinsic_list[@] "$BASE_DIR/$2_intrinsics.gypi"
271 fi
272
273 # Write a single .gni file that includes all source files for all archs.
274 if [ 0 -ne ${#x86_list} ]; then
275 local c_sources=$(echo "$source_list" | egrep '.(c|h)$')
276 local assembly_sources=$(echo "$source_list" | egrep '.asm$')
277 local mmx_sources=$(echo "$intrinsic_list" | grep '_mmx\.c$')
278 local sse2_sources=$(echo "$intrinsic_list" | grep '_sse2\.c$')
279 local sse3_sources=$(echo "$intrinsic_list" | grep '_sse3\.c$')
280 local ssse3_sources=$(echo "$intrinsic_list" | grep '_ssse3\.c$')
281 local sse4_1_sources=$(echo "$intrinsic_list" | grep '_sse4\.c$')
282 local avx_sources=$(echo "$intrinsic_list" | grep '_avx\.c$')
283 local avx2_sources=$(echo "$intrinsic_list" | grep '_avx2\.c$')
284
285 write_gni c_sources $2 "$BASE_DIR/libvpx_srcs.gni"
286 write_gni assembly_sources $2_assembly "$BASE_DIR/libvpx_srcs.gni"
287 write_gni mmx_sources $2_mmx "$BASE_DIR/libvpx_srcs.gni"
288 write_gni sse2_sources $2_sse2 "$BASE_DIR/libvpx_srcs.gni"
289 write_gni sse3_sources $2_sse3 "$BASE_DIR/libvpx_srcs.gni"
290 write_gni ssse3_sources $2_ssse3 "$BASE_DIR/libvpx_srcs.gni"
291 write_gni sse4_1_sources $2_sse4_1 "$BASE_DIR/libvpx_srcs.gni"
292 if [ -z "$DISABLE_AVX" ]; then
293 write_gni avx_sources $2_avx "$BASE_DIR/libvpx_srcs.gni"
294 write_gni avx2_sources $2_avx2 "$BASE_DIR/libvpx_srcs.gni"
295 fi
296 else
297 local c_sources=$(echo "$source_list" | egrep '.(c|h)$')
298 local assembly_sources=$(echo -e "$source_list\n$intrinsic_list" | \
299 egrep '.asm$')
300 local neon_sources=$(echo "$intrinsic_list" | grep '_neon\.c$')
301 write_gni c_sources $2 "$BASE_DIR/libvpx_srcs.gni"
302 write_gni assembly_sources $2_assembly "$BASE_DIR/libvpx_srcs.gni"
303 if [ 0 -ne ${#neon_sources} ]; then
304 write_gni neon_sources $2_neon "$BASE_DIR/libvpx_srcs.gni"
305 fi
306 fi
307 }
308
309 # Clean files from previous make.
310 function make_clean {
311 make clean > /dev/null
312 rm -f libvpx_srcs.txt
313 }
314
315 # Lint a pair of vpx_config.h and vpx_config.asm to make sure they match.
316 # $1 - Header file directory.
317 function lint_config {
318 # mips does not contain any assembly so the header does not need to be
319 # compared to the asm.
320 if [[ "$1" != *mipsel && "$1" != *mips64el ]]; then
321 $BASE_DIR/lint_config.sh \
322 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \
323 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm
324 fi
325 }
326
327 # Print the configuration.
328 # $1 - Header file directory.
329 function print_config {
330 $BASE_DIR/lint_config.sh -p \
331 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \
332 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm
333 }
334
335 # Print the configuration from Header file.
336 # This function is an abridged version of print_config which does not use
337 # lint_config and it does not require existence of vpx_config.asm.
338 # $1 - Header file directory.
339 function print_config_basic {
340 combined_config="$(cat $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \
341 | grep -E ' +[01] *$')"
342 combined_config="$(echo "$combined_config" | grep -v DO1STROUNDING)"
343 combined_config="$(echo "$combined_config" | sed 's/[ \t]//g')"
344 combined_config="$(echo "$combined_config" | sed 's/.*define//')"
345 combined_config="$(echo "$combined_config" | sed 's/0$/=no/')"
346 combined_config="$(echo "$combined_config" | sed 's/1$/=yes/')"
347 echo "$combined_config" | sort | uniq
348 }
349
350 # Generate *_rtcd.h files.
351 # $1 - Header file directory.
352 # $2 - Architecture.
353 function gen_rtcd_header {
354 echo "Generate $LIBVPX_CONFIG_DIR/$1/*_rtcd.h files."
355
356 rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config
357 if [[ "$2" == "mipsel" || "$2" == "mips64el" ]]; then
358 print_config_basic $1 > $BASE_DIR/$TEMP_DIR/libvpx.config
359 else
360 $BASE_DIR/lint_config.sh -p \
361 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \
362 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm \
363 -o $BASE_DIR/$TEMP_DIR/libvpx.config
364 fi
365
366 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \
367 --arch=$2 \
368 --sym=vp8_rtcd $DISABLE_AVX \
369 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \
370 $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.pl \
371 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp8_rtcd.h
372
373 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \
374 --arch=$2 \
375 --sym=vp9_rtcd $DISABLE_AVX \
376 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \
377 $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.pl \
378 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp9_rtcd.h
379
380 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \
381 --arch=$2 \
382 --sym=vpx_scale_rtcd $DISABLE_AVX \
383 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \
384 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.pl \
385 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_scale_rtcd.h
386
387 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \
388 --arch=$2 \
389 --sym=vpx_dsp_rtcd $DISABLE_AVX \
390 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \
391 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_dsp/vpx_dsp_rtcd_defs.pl \
392 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_dsp_rtcd.h
393
394 rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config
395 }
396
397 # Generate Config files. "--enable-external-build" must be set to skip
398 # detection of capabilities on specific targets.
399 # $1 - Header file directory.
400 # $2 - Config command line.
401 function gen_config_files {
402 ./configure $2 > /dev/null
403
404 # Disable HAVE_UNISTD_H as it causes vp8 to try to detect how many cpus
405 # available, which doesn't work from iniside a sandbox on linux.
406 ( echo '/HAVE_UNISTD_H/s/[01]/0/' ; echo 'w' ; echo 'q' ) | ed -s vpx_config.h
407
408 # Generate vpx_config.asm. Do not create one for mips.
409 if [[ "$1" != *mipsel && "$1" != *mips64el ]]; then
410 if [[ "$1" == *x64* ]] || [[ "$1" == *ia32* ]]; then
411 egrep "#define [A-Z0-9_]+ [01]" vpx_config.h | awk '{print "%define " $2 " " $3}' > vpx_config.asm
412 else
413 egrep "#define [A-Z0-9_]+ [01]" vpx_config.h | awk '{print $2 " EQU " $3}' | perl $BASE_DIR/$LIBVPX_SRC_DIR/build/make/ads2gas.pl > vpx_config.asm
414 fi
415 fi
416
417 cp vpx_config.* $BASE_DIR/$LIBVPX_CONFIG_DIR/$1
418 make_clean
419 rm -rf vpx_config.*
420 }
421
422 echo "Create temporary directory."
423 TEMP_DIR="$LIBVPX_SRC_DIR.temp"
424 rm -rf $TEMP_DIR
425 cp -R $LIBVPX_SRC_DIR $TEMP_DIR
426 cd $TEMP_DIR
427
428 echo "Generate config files."
429 all_platforms="--enable-external-build --enable-postproc --disable-install-srcs --enable-multi-res-encoding --enable-temporal-denoising --disable-unit-tests --d isable-install-docs --disable-examples --enable-vp9-temporal-denoising --enable- vp9-postproc --size-limit=16384x16384 $DISABLE_AVX"
430 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi c --enable-realtime-only ${all_platforms}"
431 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable- pic --enable-realtime-only ${all_platforms}"
432 gen_config_files linux/arm "--target=armv6-linux-gcc --enable-pic --enable-realt ime-only --disable-install-bins --disable-install-libs --disable-edsp ${all_plat forms}"
433 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable- realtime-only --disable-edsp ${all_platforms}"
434 gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-pi c --enable-realtime-only --enable-runtime-cpu-detect --disable-edsp ${all_platfo rms}"
435 gen_config_files linux/arm64 "--force-target=armv8-linux-gcc --enable-pic --enab le-realtime-only --disable-edsp ${all_platforms}"
436 gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}"
437 gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
438 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt ime-only ${all_platforms}"
439 gen_config_files win/ia32 "--target=x86-win32-vs12 --enable-realtime-only ${all_ platforms}"
440 gen_config_files win/x64 "--target=x86_64-win64-vs12 --enable-realtime-only ${al l_platforms}"
441 gen_config_files mac/ia32 "--target=x86-darwin9-gcc --enable-pic --enable-realti me-only ${all_platforms}"
442 gen_config_files mac/x64 "--target=x86_64-darwin9-gcc --enable-pic --enable-real time-only ${all_platforms}"
443 gen_config_files nacl "--target=generic-gnu --enable-pic --enable-realtime-only ${all_platforms}"
444
445 echo "Remove temporary directory."
446 cd $BASE_DIR
447 rm -rf $TEMP_DIR
448
449 echo "Lint libvpx configuration."
450 lint_config linux/ia32
451 lint_config linux/x64
452 lint_config linux/arm
453 lint_config linux/arm-neon
454 lint_config linux/arm-neon-cpu-detect
455 lint_config linux/arm64
456 lint_config linux/mipsel
457 lint_config linux/mips64el
458 lint_config linux/generic
459 lint_config win/ia32
460 lint_config win/x64
461 lint_config mac/ia32
462 lint_config mac/x64
463 lint_config nacl
464
465 echo "Create temporary directory."
466 TEMP_DIR="$LIBVPX_SRC_DIR.temp"
467 rm -rf $TEMP_DIR
468 cp -R $LIBVPX_SRC_DIR $TEMP_DIR
469 cd $TEMP_DIR
470
471 gen_rtcd_header linux/ia32 x86
472 gen_rtcd_header linux/x64 x86_64
473 gen_rtcd_header linux/arm armv6
474 gen_rtcd_header linux/arm-neon armv7
475 gen_rtcd_header linux/arm-neon-cpu-detect armv7
476 gen_rtcd_header linux/arm64 armv8
477 gen_rtcd_header linux/mipsel mipsel
478 gen_rtcd_header linux/mips64el mips64el
479 gen_rtcd_header linux/generic generic
480 gen_rtcd_header win/ia32 x86
481 gen_rtcd_header win/x64 x86_64
482 gen_rtcd_header mac/ia32 x86
483 gen_rtcd_header mac/x64 x86_64
484 gen_rtcd_header nacl nacl
485
486 echo "Prepare Makefile."
487 ./configure --target=generic-gnu > /dev/null
488 make_clean
489
490 if [ -z $ONLY_CONFIGS ]; then
491 # Remove existing .gni file.
492 rm -rf $BASE_DIR/libvpx_srcs.gni
493 write_license $BASE_DIR/libvpx_srcs.gni
494
495 echo "Generate X86 source list."
496 config=$(print_config linux/ia32)
497 make_clean
498 make libvpx_srcs.txt target=libs $config > /dev/null
499 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_x86
500
501 # Copy vpx_version.h. The file should be the same for all platforms.
502 cp vpx_version.h $BASE_DIR/$LIBVPX_CONFIG_DIR
503
504 echo "Generate X86_64 source list."
505 config=$(print_config linux/x64)
506 make_clean
507 make libvpx_srcs.txt target=libs $config > /dev/null
508 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_x86_64
509
510 echo "Generate ARM source list."
511 config=$(print_config linux/arm)
512 make_clean
513 make libvpx_srcs.txt target=libs $config > /dev/null
514 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm
515
516 echo "Generate ARM NEON source list."
517 config=$(print_config linux/arm-neon)
518 make_clean
519 make libvpx_srcs.txt target=libs $config > /dev/null
520 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm_neon
521
522 echo "Generate ARM NEON CPU DETECT source list."
523 config=$(print_config linux/arm-neon-cpu-detect)
524 make_clean
525 make libvpx_srcs.txt target=libs $config > /dev/null
526 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm_neon_cpu_detect
527
528 echo "Generate ARM64 source list."
529 config=$(print_config linux/arm64)
530 make_clean
531 make libvpx_srcs.txt target=libs $config > /dev/null
532 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm64
533
534 echo "Generate MIPS source list."
535 config=$(print_config_basic linux/mipsel)
536 make_clean
537 make libvpx_srcs.txt target=libs $config > /dev/null
538 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_mips
539
540 echo "MIPS64 source list is identical to MIPS source list. No need to generate it."
541
542 echo "Generate NaCl source list."
543 config=$(print_config_basic nacl)
544 make_clean
545 make libvpx_srcs.txt target=libs $config > /dev/null
546 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_nacl
547
548 echo "Generate GENERIC source list."
549 config=$(print_config_basic linux/generic)
550 make_clean
551 make libvpx_srcs.txt target=libs $config > /dev/null
552 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_generic
553 fi
554
555 echo "Remove temporary directory."
556 cd $BASE_DIR
557 rm -rf $TEMP_DIR
558
559 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel?
OLDNEW
« no previous file with comments | « third_party/libvpx_new/ads2gas.gypi ('k') | third_party/libvpx_new/include/elf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698