Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
19125ae1
Commit
19125ae1
authored
10 years ago
by
Tom Finegan
Committed by
Gerrit Code Review
10 years ago
Browse files
Options
Download
Plain Diff
Merge "iosbuild.sh: Add vpx_config.h and vpx_version.h to VPX.framework."
parents
374b21b2
13681121
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
nextgen
nextgenv2
sandbox/Jingning/experimental
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build/make/iosbuild.sh
+83
-8
build/make/iosbuild.sh
with
83 additions
and
8 deletions
build/make/iosbuild.sh
+
83
−
8
View file @
19125ae1
...
...
@@ -50,9 +50,79 @@ build_target() {
vlog
"***Done building target:
${
target
}
***"
}
# Returns the preprocessor symbol for the target specified by $1.
target_to_preproc_symbol
()
{
target
=
"
$1
"
case
"
${
target
}
"
in
armv6-
*
)
echo
"__ARM_ARCH_6__"
;;
armv7-
*
)
echo
"__ARM_ARCH_7__"
;;
armv7s-
*
)
echo
"__ARM_ARCH_7S__"
;;
x86-
*
)
echo
"__i386__"
;;
x86_64-
*
)
echo
"__x86_64__"
;;
*
)
echo
"#error
${
target
}
unknown/unsupported"
return
1
;;
esac
}
# Create a vpx_config.h shim that, based on preprocessor settings for the
# current target CPU, includes the real vpx_config.h for the current target.
# $1 is the list of targets.
create_vpx_framework_config_shim
()
{
local
targets
=
"
$1
"
local
config_file
=
"
${
HEADER_DIR
}
/vpx_config.h"
local
preproc_symbol
=
""
local
target
=
""
local
include_guard
=
"VPX_FRAMEWORK_HEADERS_VPX_VPX_CONFIG_H_"
local
file_header
=
"/*
* Copyright (c)
$(
date
+%Y
)
The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/* GENERATED FILE: DO NOT EDIT! */
#ifndef
${
include_guard
}
#define
${
include_guard
}
#if defined"
printf
"%s"
"
${
file_header
}
"
>
"
${
config_file
}
"
for
target
in
${
targets
}
;
do
preproc_symbol
=
$(
target_to_preproc_symbol
"
${
target
}
"
)
printf
"
${
preproc_symbol
}
\n
"
>>
"
${
config_file
}
"
printf
"#include
\"
VPX/vpx/
${
target
}
/vpx_config.h
\"\n
"
>>
"
${
config_file
}
"
printf
"#elif defined"
>>
"
${
config_file
}
"
mkdir
"
${
HEADER_DIR
}
/
${
target
}
"
cp
-p
"
${
BUILD_ROOT
}
/
${
target
}
/vpx_config.h"
"
${
HEADER_DIR
}
/
${
target
}
"
done
# Consume the last line of output from the loop: We don't want it.
sed
-i
''
-e
'$d'
"
${
config_file
}
"
printf
"#endif
\n\n
"
>>
"
${
config_file
}
"
printf
"#endif //
${
include_guard
}
"
>>
"
${
config_file
}
"
}
# Configures and builds each target specified by $1, and then builds
# VPX.framework.
build_
targets
()
{
build_
framework
()
{
local
lib_list
=
""
local
targets
=
"
$1
"
local
target
=
""
...
...
@@ -75,15 +145,20 @@ build_targets() {
cd
"
${
ORIG_PWD
}
"
# Includes are identical for all platforms, and according to dist target
# behavior vpx_config.h and vpx_version.h aren't actually necessary for user
# apps built with libvpx. So, just copy the includes from the last target
# built.
# TODO(tomfinegan): The above is a lame excuse. Build common config/version
# includes that use the preprocessor to include the correct file.
# The basic libvpx API includes are all the same; just grab the most recent
# set.
cp
-p
"
${
target_dist_dir
}
"
/include/vpx/
*
"
${
HEADER_DIR
}
"
# Build the fat library.
${
LIPO
}
-create
${
lib_list
}
-output
${
FRAMEWORK_DIR
}
/VPX
# Create the vpx_config.h shim that allows usage of vpx_config.h from
# within VPX.framework.
create_vpx_framework_config_shim
"
${
targets
}
"
# Copy in vpx_version.h.
cp
-p
"
${
BUILD_ROOT
}
/
${
target
}
/vpx_version.h"
"
${
HEADER_DIR
}
"
vlog
"Created fat library
${
FRAMEWORK_DIR
}
/VPX containing:"
for
lib
in
${
lib_list
}
;
do
vlog
"
$(
echo
${
lib
}
|
awk
-F
/
'{print $2, $NF}'
)
"
...
...
@@ -166,4 +241,4 @@ cat << EOF
EOF
fi
build_
targets
"
${
TARGETS
}
"
build_
framework
"
${
TARGETS
}
"
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets