| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 file_list_sz=${#file_list[@]} | 149 file_list_sz=${#file_list[@]} |
| 150 for i in ${!file_list[@]}; do | 150 for i in ${!file_list[@]}; do |
| 151 f=${file_list[i]} | 151 f=${file_list[i]} |
| 152 for pat in ${pats//;/$IFS}; do | 152 for pat in ${pats//;/$IFS}; do |
| 153 if [ "${f##*.}" == "$pat" ]; then | 153 if [ "${f##*.}" == "$pat" ]; then |
| 154 unset file_list[i] | 154 unset file_list[i] |
| 155 | 155 |
| 156 objf=$(echo ${f%.*}.obj | sed -e 's/^[\./]\+//g' -e 's,/,_,g') | 156 objf=$(echo ${f%.*}.obj | sed -e 's/^[\./]\+//g' -e 's,/,_,g') |
| 157 | 157 |
| 158 if ([ "$pat" == "asm" ] || [ "$pat" == "s" ]) && $asm_use_custom
_step; then | 158 if ([ "$pat" == "asm" ] || [ "$pat" == "s" ]) && $asm_use_custom
_step; then |
| 159 # Avoid object file name collisions, i.e. vpx_config.c and |
| 160 # vpx_config.asm produce the same object file without |
| 161 # this additional suffix. |
| 162 objf=${objf%.obj}_asm.obj |
| 159 open_tag CustomBuild \ | 163 open_tag CustomBuild \ |
| 160 Include=".\\$f" | 164 Include=".\\$f" |
| 161 for plat in "${platforms[@]}"; do | 165 for plat in "${platforms[@]}"; do |
| 162 for cfg in Debug Release; do | 166 for cfg in Debug Release; do |
| 163 tag_content Message "Assembling %(Filename)%(Extensi
on)" \ | 167 tag_content Message "Assembling %(Filename)%(Extensi
on)" \ |
| 164 Condition="'\$(Configuration)|\$(Platform)'=='$c
fg|$plat'" | 168 Condition="'\$(Configuration)|\$(Platform)'=='$c
fg|$plat'" |
| 165 tag_content Command "$(eval echo \$asm_${cfg}_cmdlin
e) -o \$(IntDir)$objf" \ | 169 tag_content Command "$(eval echo \$asm_${cfg}_cmdlin
e) -o \$(IntDir)$objf" \ |
| 166 Condition="'\$(Configuration)|\$(Platform)'=='$c
fg|$plat'" | 170 Condition="'\$(Configuration)|\$(Platform)'=='$c
fg|$plat'" |
| 167 tag_content Outputs "\$(IntDir)$objf" \ | 171 tag_content Outputs "\$(IntDir)$objf" \ |
| 168 Condition="'\$(Configuration)|\$(Platform)'=='$c
fg|$plat'" | 172 Condition="'\$(Configuration)|\$(Platform)'=='$c
fg|$plat'" |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 tag PropertyGroup \ | 427 tag PropertyGroup \ |
| 424 Label="UserMacros" | 428 Label="UserMacros" |
| 425 | 429 |
| 426 for plat in "${platforms[@]}"; do | 430 for plat in "${platforms[@]}"; do |
| 427 plat_no_ws=`echo $plat | sed 's/[^A-Za-z0-9_]/_/g'` | 431 plat_no_ws=`echo $plat | sed 's/[^A-Za-z0-9_]/_/g'` |
| 428 for config in Debug Release; do | 432 for config in Debug Release; do |
| 429 open_tag PropertyGroup \ | 433 open_tag PropertyGroup \ |
| 430 Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" | 434 Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" |
| 431 tag_content OutDir "\$(SolutionDir)$plat_no_ws\\\$(Configuration)\\" | 435 tag_content OutDir "\$(SolutionDir)$plat_no_ws\\\$(Configuration)\\" |
| 432 tag_content IntDir "$plat_no_ws\\\$(Configuration)\\${name}\\" | 436 tag_content IntDir "$plat_no_ws\\\$(Configuration)\\${name}\\" |
| 437 if [ "$proj_kind" == "lib" ]; then |
| 438 if [ "$config" == "Debug" ]; then |
| 439 config_suffix=d |
| 440 else |
| 441 config_suffix="" |
| 442 fi |
| 443 tag_content TargetName "${name}${lib_sfx}${config_suffix}" |
| 444 fi |
| 433 close_tag PropertyGroup | 445 close_tag PropertyGroup |
| 434 done | 446 done |
| 435 done | 447 done |
| 436 | 448 |
| 437 for plat in "${platforms[@]}"; do | 449 for plat in "${platforms[@]}"; do |
| 438 for config in Debug Release; do | 450 for config in Debug Release; do |
| 439 open_tag ItemDefinitionGroup \ | 451 open_tag ItemDefinitionGroup \ |
| 440 Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" | 452 Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" |
| 441 if [ "$name" = "vpx" ]; then | 453 if [ "$name" == "vpx" ]; then |
| 454 hostplat=$plat |
| 455 if [ "$hostplat" == "ARM" ]; then |
| 456 hostplat=Win32 |
| 457 fi |
| 442 open_tag PreBuildEvent | 458 open_tag PreBuildEvent |
| 443 tag_content Command "call obj_int_extract.bat $src_path_bare" | 459 tag_content Command "call obj_int_extract.bat $src_path_bare $ho
stplat\\\$(Configuration)" |
| 444 close_tag PreBuildEvent | 460 close_tag PreBuildEvent |
| 445 fi | 461 fi |
| 446 open_tag ClCompile | 462 open_tag ClCompile |
| 447 if [ "$config" = "Debug" ]; then | 463 if [ "$config" = "Debug" ]; then |
| 448 opt=Disabled | 464 opt=Disabled |
| 449 runtime=$debug_runtime | 465 runtime=$debug_runtime |
| 450 curlibs=$debug_libs | 466 curlibs=$debug_libs |
| 451 confsuffix=d | |
| 452 case "$name" in | 467 case "$name" in |
| 453 obj_int_extract) | 468 obj_int_extract) |
| 454 debug=DEBUG | 469 debug=DEBUG |
| 455 ;; | 470 ;; |
| 456 *) | 471 *) |
| 457 debug=_DEBUG | 472 debug=_DEBUG |
| 458 ;; | 473 ;; |
| 459 esac | 474 esac |
| 460 else | 475 else |
| 461 opt=MaxSpeed | 476 opt=MaxSpeed |
| 462 runtime=$release_runtime | 477 runtime=$release_runtime |
| 463 curlibs=$libs | 478 curlibs=$libs |
| 464 confsuffix="" | |
| 465 tag_content FavorSizeOrSpeed Speed | 479 tag_content FavorSizeOrSpeed Speed |
| 466 debug=NDEBUG | 480 debug=NDEBUG |
| 467 fi | 481 fi |
| 468 case "$name" in | 482 case "$name" in |
| 469 obj_int_extract) | 483 obj_int_extract) |
| 470 extradefines=";_CONSOLE" | 484 extradefines=";_CONSOLE" |
| 471 ;; | 485 ;; |
| 472 *) | 486 *) |
| 473 extradefines=";$defines" | 487 extradefines=";$defines" |
| 474 ;; | 488 ;; |
| 475 esac | 489 esac |
| 476 tag_content Optimization $opt | 490 tag_content Optimization $opt |
| 477 tag_content AdditionalIncludeDirectories "$incs;%(AdditionalIncludeD
irectories)" | 491 tag_content AdditionalIncludeDirectories "$incs;%(AdditionalIncludeD
irectories)" |
| 478 tag_content PreprocessorDefinitions "WIN32;$debug;_CRT_SECURE_NO_WAR
NINGS;_CRT_SECURE_NO_DEPRECATE$extradefines;%(PreprocessorDefinitions)" | 492 tag_content PreprocessorDefinitions "WIN32;$debug;_CRT_SECURE_NO_WAR
NINGS;_CRT_SECURE_NO_DEPRECATE$extradefines;%(PreprocessorDefinitions)" |
| 479 tag_content RuntimeLibrary $runtime | 493 tag_content RuntimeLibrary $runtime |
| 480 tag_content WarningLevel Level3 | 494 tag_content WarningLevel Level3 |
| 481 # DebugInformationFormat | 495 # DebugInformationFormat |
| 482 close_tag ClCompile | 496 close_tag ClCompile |
| 483 case "$proj_kind" in | 497 case "$proj_kind" in |
| 484 exe) | 498 exe) |
| 485 open_tag Link | 499 open_tag Link |
| 486 if [ "$name" = "obj_int_extract" ]; then | 500 if [ "$name" != "obj_int_extract" ]; then |
| 487 tag_content OutputFile "${name}.exe" | |
| 488 else | |
| 489 tag_content AdditionalDependencies "$curlibs" | 501 tag_content AdditionalDependencies "$curlibs" |
| 490 tag_content AdditionalLibraryDirectories "$libdirs;%(Additio
nalLibraryDirectories)" | 502 tag_content AdditionalLibraryDirectories "$libdirs;%(Additio
nalLibraryDirectories)" |
| 491 fi | 503 fi |
| 492 tag_content GenerateDebugInformation true | 504 tag_content GenerateDebugInformation true |
| 493 close_tag Link | 505 close_tag Link |
| 494 ;; | 506 ;; |
| 495 dll) | 507 dll) |
| 496 open_tag Link | 508 open_tag Link |
| 497 tag_content GenerateDebugInformation true | 509 tag_content GenerateDebugInformation true |
| 498 tag_content ModuleDefinitionFile $module_def | 510 tag_content ModuleDefinitionFile $module_def |
| 499 close_tag Link | 511 close_tag Link |
| 500 ;; | 512 ;; |
| 501 lib) | 513 lib) |
| 502 open_tag Lib | |
| 503 tag_content OutputFile "\$(OutDir)${name}${lib_sfx}${confsuffix}
.lib" | |
| 504 close_tag Lib | |
| 505 ;; | 514 ;; |
| 506 esac | 515 esac |
| 507 close_tag ItemDefinitionGroup | 516 close_tag ItemDefinitionGroup |
| 508 done | 517 done |
| 509 | 518 |
| 510 done | 519 done |
| 511 | 520 |
| 512 open_tag ItemGroup | 521 open_tag ItemGroup |
| 513 generate_filter "Source Files" "c;cc;def;odl;idl;hpj;bat;asm;asmx;s" | 522 generate_filter "Source Files" "c;cc;def;odl;idl;hpj;bat;asm;asmx;s" |
| 514 close_tag ItemGroup | 523 close_tag ItemGroup |
| (...skipping 24 matching lines...) Expand all Loading... |
| 539 } | 548 } |
| 540 | 549 |
| 541 # This regexp doesn't catch most of the strings in the vcxproj format, | 550 # This regexp doesn't catch most of the strings in the vcxproj format, |
| 542 # since they're like <tag>path</tag> instead of <tag attr="path" /> | 551 # since they're like <tag>path</tag> instead of <tag attr="path" /> |
| 543 # as previously. It still seems to work ok despite this. | 552 # as previously. It still seems to work ok despite this. |
| 544 generate_vcxproj | | 553 generate_vcxproj | |
| 545 sed -e '/"/s;\([^ "]\)/;\1\\;g' | | 554 sed -e '/"/s;\([^ "]\)/;\1\\;g' | |
| 546 sed -e '/xmlns/s;\\;/;g' > ${outfile} | 555 sed -e '/xmlns/s;\\;/;g' > ${outfile} |
| 547 | 556 |
| 548 exit | 557 exit |
| OLD | NEW |