OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 ## | 2 ## |
3 ## Copyright (c) 2013 The WebM project authors. All Rights Reserved. | 3 ## Copyright (c) 2013 The WebM project authors. All Rights Reserved. |
4 ## | 4 ## |
5 ## Use of this source code is governed by a BSD-style license | 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 | 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 | 7 ## tree. An additional intellectual property rights grant can be found |
8 ## in the file PATENTS. All contributing project authors may | 8 ## in the file PATENTS. All contributing project authors may |
9 ## be found in the AUTHORS file in the root of the source tree. | 9 ## be found in the AUTHORS file in the root of the source tree. |
10 ## | 10 ## |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 platforms[0]="x64" | 255 platforms[0]="x64" |
256 asm_Debug_cmdline="yasm -Xvc -g cv8 -f win64 ${yasmincs} "%(FullPat
h)"" | 256 asm_Debug_cmdline="yasm -Xvc -g cv8 -f win64 ${yasmincs} "%(FullPat
h)"" |
257 asm_Release_cmdline="yasm -Xvc -f win64 ${yasmincs} "%(FullPath)&qu
ot;" | 257 asm_Release_cmdline="yasm -Xvc -f win64 ${yasmincs} "%(FullPath)&qu
ot;" |
258 ;; | 258 ;; |
259 x86*) | 259 x86*) |
260 platforms[0]="Win32" | 260 platforms[0]="Win32" |
261 asm_Debug_cmdline="yasm -Xvc -g cv8 -f win32 ${yasmincs} "%(FullPat
h)"" | 261 asm_Debug_cmdline="yasm -Xvc -g cv8 -f win32 ${yasmincs} "%(FullPat
h)"" |
262 asm_Release_cmdline="yasm -Xvc -f win32 ${yasmincs} "%(FullPath)&qu
ot;" | 262 asm_Release_cmdline="yasm -Xvc -f win32 ${yasmincs} "%(FullPath)&qu
ot;" |
263 ;; | 263 ;; |
264 arm*) | 264 arm*) |
| 265 platforms[0]="ARM" |
265 asm_Debug_cmdline="armasm -nologo "%(FullPath)"" | 266 asm_Debug_cmdline="armasm -nologo "%(FullPath)"" |
266 asm_Release_cmdline="armasm -nologo "%(FullPath)"" | 267 asm_Release_cmdline="armasm -nologo "%(FullPath)"" |
267 if [ "$name" = "obj_int_extract" ]; then | |
268 # We don't want to build this tool for the target architecture, | |
269 # but for an architecture we can run locally during the build. | |
270 platforms[0]="Win32" | |
271 else | |
272 platforms[0]="ARM" | |
273 fi | |
274 ;; | 268 ;; |
275 *) die "Unsupported target $target!" | 269 *) die "Unsupported target $target!" |
276 ;; | 270 ;; |
277 esac | 271 esac |
278 | 272 |
279 generate_vcxproj() { | 273 generate_vcxproj() { |
280 echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" | 274 echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" |
281 open_tag Project \ | 275 open_tag Project \ |
282 DefaultTargets="Build" \ | 276 DefaultTargets="Build" \ |
283 ToolsVersion="4.0" \ | 277 ToolsVersion="4.0" \ |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 387 |
394 for plat in "${platforms[@]}"; do | 388 for plat in "${platforms[@]}"; do |
395 for config in Debug Release; do | 389 for config in Debug Release; do |
396 open_tag ItemDefinitionGroup \ | 390 open_tag ItemDefinitionGroup \ |
397 Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" | 391 Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" |
398 if [ "$name" == "vpx" ]; then | 392 if [ "$name" == "vpx" ]; then |
399 hostplat=$plat | 393 hostplat=$plat |
400 if [ "$hostplat" == "ARM" ]; then | 394 if [ "$hostplat" == "ARM" ]; then |
401 hostplat=Win32 | 395 hostplat=Win32 |
402 fi | 396 fi |
403 open_tag PreBuildEvent | |
404 tag_content Command "call obj_int_extract.bat "$src_path_ba
re" $hostplat\\\$(Configuration)" | |
405 close_tag PreBuildEvent | |
406 fi | 397 fi |
407 open_tag ClCompile | 398 open_tag ClCompile |
408 if [ "$config" = "Debug" ]; then | 399 if [ "$config" = "Debug" ]; then |
409 opt=Disabled | 400 opt=Disabled |
410 runtime=$debug_runtime | 401 runtime=$debug_runtime |
411 curlibs=$debug_libs | 402 curlibs=$debug_libs |
412 case "$name" in | 403 debug=_DEBUG |
413 obj_int_extract) | |
414 debug=DEBUG | |
415 ;; | |
416 *) | |
417 debug=_DEBUG | |
418 ;; | |
419 esac | |
420 else | 404 else |
421 opt=MaxSpeed | 405 opt=MaxSpeed |
422 runtime=$release_runtime | 406 runtime=$release_runtime |
423 curlibs=$libs | 407 curlibs=$libs |
424 tag_content FavorSizeOrSpeed Speed | 408 tag_content FavorSizeOrSpeed Speed |
425 debug=NDEBUG | 409 debug=NDEBUG |
426 fi | 410 fi |
427 case "$name" in | 411 extradefines=";$defines" |
428 obj_int_extract) | |
429 extradefines=";_CONSOLE" | |
430 ;; | |
431 *) | |
432 extradefines=";$defines" | |
433 ;; | |
434 esac | |
435 tag_content Optimization $opt | 412 tag_content Optimization $opt |
436 tag_content AdditionalIncludeDirectories "$incs;%(AdditionalIncludeD
irectories)" | 413 tag_content AdditionalIncludeDirectories "$incs;%(AdditionalIncludeD
irectories)" |
437 tag_content PreprocessorDefinitions "WIN32;$debug;_CRT_SECURE_NO_WAR
NINGS;_CRT_SECURE_NO_DEPRECATE$extradefines;%(PreprocessorDefinitions)" | 414 tag_content PreprocessorDefinitions "WIN32;$debug;_CRT_SECURE_NO_WAR
NINGS;_CRT_SECURE_NO_DEPRECATE$extradefines;%(PreprocessorDefinitions)" |
438 tag_content RuntimeLibrary $runtime | 415 tag_content RuntimeLibrary $runtime |
439 tag_content WarningLevel Level3 | 416 tag_content WarningLevel Level3 |
440 if ${werror:-false}; then | 417 if ${werror:-false}; then |
441 tag_content TreatWarningAsError true | 418 tag_content TreatWarningAsError true |
442 fi | 419 fi |
443 if [ $vs_ver -ge 11 ]; then | 420 if [ $vs_ver -ge 11 ]; then |
444 # We need to override the defaults for these settings | 421 # We need to override the defaults for these settings |
445 # if AppContainerApplication is set. | 422 # if AppContainerApplication is set. |
446 tag_content CompileAsWinRT false | 423 tag_content CompileAsWinRT false |
447 tag_content PrecompiledHeader NotUsing | 424 tag_content PrecompiledHeader NotUsing |
448 tag_content SDLCheck false | 425 tag_content SDLCheck false |
449 fi | 426 fi |
450 close_tag ClCompile | 427 close_tag ClCompile |
451 case "$proj_kind" in | 428 case "$proj_kind" in |
452 exe) | 429 exe) |
453 open_tag Link | 430 open_tag Link |
454 if [ "$name" != "obj_int_extract" ]; then | |
455 tag_content AdditionalDependencies "$curlibs;%(AdditionalDep
endencies)" | |
456 tag_content AdditionalLibraryDirectories "$libdirs;%(Additio
nalLibraryDirectories)" | |
457 fi | |
458 tag_content GenerateDebugInformation true | 431 tag_content GenerateDebugInformation true |
459 # Console is the default normally, but if | 432 # Console is the default normally, but if |
460 # AppContainerApplication is set, we need to override it. | 433 # AppContainerApplication is set, we need to override it. |
461 tag_content SubSystem Console | 434 tag_content SubSystem Console |
462 close_tag Link | 435 close_tag Link |
463 ;; | 436 ;; |
464 dll) | 437 dll) |
465 open_tag Link | 438 open_tag Link |
466 tag_content GenerateDebugInformation true | 439 tag_content GenerateDebugInformation true |
467 tag_content ModuleDefinitionFile $module_def | 440 tag_content ModuleDefinitionFile $module_def |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 } | 478 } |
506 | 479 |
507 # This regexp doesn't catch most of the strings in the vcxproj format, | 480 # This regexp doesn't catch most of the strings in the vcxproj format, |
508 # since they're like <tag>path</tag> instead of <tag attr="path" /> | 481 # since they're like <tag>path</tag> instead of <tag attr="path" /> |
509 # as previously. It still seems to work ok despite this. | 482 # as previously. It still seems to work ok despite this. |
510 generate_vcxproj | | 483 generate_vcxproj | |
511 sed -e '/"/s;\([^ "]\)/;\1\\;g' | | 484 sed -e '/"/s;\([^ "]\)/;\1\\;g' | |
512 sed -e '/xmlns/s;\\;/;g' > ${outfile} | 485 sed -e '/xmlns/s;\\;/;g' > ${outfile} |
513 | 486 |
514 exit | 487 exit |
OLD | NEW |