summaryrefslogtreecommitdiff
path: root/build/make
diff options
context:
space:
mode:
Diffstat (limited to 'build/make')
-rwxr-xr-xbuild/make/configure.sh13
-rwxr-xr-xbuild/make/gen_msvs_proj.sh15
-rwxr-xr-xbuild/make/gen_msvs_vcxproj.sh15
-rw-r--r--build/make/msvs_common.sh19
4 files changed, 52 insertions, 10 deletions
diff --git a/build/make/configure.sh b/build/make/configure.sh
index ad7dc8256..e0d6a54b2 100755
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -774,6 +774,13 @@ process_common_toolchain() {
add_cflags "-mmacosx-version-min=10.9"
add_ldflags "-mmacosx-version-min=10.9"
;;
+ *-iphonesimulator-*)
+ add_cflags "-miphoneos-version-min=5.0"
+ add_ldflags "-miphoneos-version-min=5.0"
+ osx_sdk_dir="$(xcrun --sdk iphonesimulator --show-sdk-path)"
+ add_cflags "-isysroot ${osx_sdk_dir}"
+ add_ldflags "-isysroot ${osx_sdk_dir}"
+ ;;
esac
# Handle Solaris variants. Solaris 10 needs -lposix4
@@ -1164,6 +1171,12 @@ EOF
# enabled icc && ! enabled pic && add_cflags -fno-pic -mdynamic-no-pic
enabled icc && ! enabled pic && add_cflags -fno-pic
;;
+ iphonesimulator)
+ add_asflags -f macho${bits}
+ enabled x86 && sim_arch="-arch i386" || sim_arch="-arch x86_64"
+ add_cflags ${sim_arch}
+ add_ldflags ${sim_arch}
+ ;;
os2)
add_asflags -f aout
enabled debug && add_asflags -g
diff --git a/build/make/gen_msvs_proj.sh b/build/make/gen_msvs_proj.sh
index 4e803b81e..f1cc04ea5 100755
--- a/build/make/gen_msvs_proj.sh
+++ b/build/make/gen_msvs_proj.sh
@@ -67,7 +67,9 @@ generate_filter() {
if [ "${f##*.}" == "$pat" ]; then
unset file_list[i]
- objf=$(echo ${f%.*}.obj | sed -e 's/^[\./]\+//g' -e 's,[:/],_,g')
+ objf=$(echo ${f%.*}.obj \
+ | sed -e "s,$src_path_bare,," \
+ -e 's/^[\./]\+//g' -e 's,[:/ ],_,g')
open_tag File RelativePath="$f"
if [ "$pat" == "asm" ] && $asm_use_custom_step; then
@@ -153,7 +155,7 @@ for opt in "$@"; do
opt=${opt##-I}
opt=$(fix_path "$opt")
incs="${incs}${incs:+;}"${opt}""
- yasmincs="${yasmincs} -I${opt}"
+ yasmincs="${yasmincs} -I"${opt}""
;;
-D*) defines="${defines}${defines:+;}${opt##-D}"
;;
@@ -174,7 +176,8 @@ for opt in "$@"; do
-*) die_unknown $opt
;;
*)
- file_list[${#file_list[@]}]="$(fix_path $opt)"
+ # The paths in file_list are fixed outside of the loop.
+ file_list[${#file_list[@]}]="$opt"
case "$opt" in
*.asm) uses_asm=true
;;
@@ -182,6 +185,10 @@ for opt in "$@"; do
;;
esac
done
+
+# Make one call to fix_path for file_list to improve performance.
+fix_file_list
+
outfile=${outfile:-/dev/stdout}
guid=${guid:-`generate_uuid`}
asm_use_custom_step=false
@@ -300,7 +307,7 @@ generate_vcproj() {
vpx)
tag Tool \
Name="VCPreBuildEventTool" \
- CommandLine="call obj_int_extract.bat $src_path_bare $plat_no_ws\\\$(ConfigurationName)" \
+ CommandLine="call obj_int_extract.bat "$src_path_bare" $plat_no_ws\\\$(ConfigurationName)" \
tag Tool \
Name="VCCLCompilerTool" \
diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh
index 8529eed24..eee354dc7 100755
--- a/build/make/gen_msvs_vcxproj.sh
+++ b/build/make/gen_msvs_vcxproj.sh
@@ -78,7 +78,9 @@ generate_filter() {
if [ "${f##*.}" == "$pat" ]; then
unset file_list[i]
- objf=$(echo ${f%.*}.obj | sed -e 's/^[\./]\+//g' -e 's,[:/],_,g')
+ objf=$(echo ${f%.*}.obj \
+ | sed -e "s,$src_path_bare,," \
+ -e 's/^[\./]\+//g' -e 's,[:/ ],_,g')
if ([ "$pat" == "asm" ] || [ "$pat" == "s" ]) && $asm_use_custom_step; then
# Avoid object file name collisions, i.e. vpx_config.c and
@@ -175,7 +177,7 @@ for opt in "$@"; do
opt=${opt##-I}
opt=$(fix_path "$opt")
incs="${incs}${incs:+;}"${opt}""
- yasmincs="${yasmincs} -I${opt}"
+ yasmincs="${yasmincs} -I"${opt}""
;;
-D*) defines="${defines}${defines:+;}${opt##-D}"
;;
@@ -196,7 +198,8 @@ for opt in "$@"; do
-*) die_unknown $opt
;;
*)
- file_list[${#file_list[@]}]="$(fix_path $opt)"
+ # The paths in file_list are fixed outside of the loop.
+ file_list[${#file_list[@]}]="$opt"
case "$opt" in
*.asm|*.s) uses_asm=true
;;
@@ -204,6 +207,10 @@ for opt in "$@"; do
;;
esac
done
+
+# Make one call to fix_path for file_list to improve performance.
+fix_file_list
+
outfile=${outfile:-/dev/stdout}
guid=${guid:-`generate_uuid`}
asm_use_custom_step=false
@@ -392,7 +399,7 @@ generate_vcxproj() {
hostplat=Win32
fi
open_tag PreBuildEvent
- tag_content Command "call obj_int_extract.bat $src_path_bare $hostplat\\\$(Configuration)"
+ tag_content Command "call obj_int_extract.bat "$src_path_bare" $hostplat\\\$(Configuration)"
close_tag PreBuildEvent
fi
open_tag ClCompile
diff --git a/build/make/msvs_common.sh b/build/make/msvs_common.sh
index eb2eb7bcf..90c14888c 100644
--- a/build/make/msvs_common.sh
+++ b/build/make/msvs_common.sh
@@ -13,7 +13,7 @@ if [ "$(uname -o 2>/dev/null)" = "Cygwin" ] \
&& cygpath --help >/dev/null 2>&1; then
FIXPATH='cygpath -m'
else
- FIXPATH='echo'
+ FIXPATH='echo_path'
fi
die() {
@@ -27,8 +27,23 @@ die_unknown(){
exit 1
}
+echo_path() {
+ for path; do
+ echo "$path"
+ done
+}
+
+# Output one, possibly changed based on the system, path per line.
fix_path() {
- $FIXPATH "$1"
+ $FIXPATH "$@"
+}
+
+# Corrects the paths in file_list in one pass for efficiency.
+fix_file_list() {
+ # TODO(jzern): this could be more generic and take the array as a param.
+ files=$(fix_path "${file_list[@]}")
+ local IFS=$'\n'
+ file_list=($files)
}
generate_uuid() {