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

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

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

Powered by Google App Engine
This is Rietveld 408576698