Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
libvpx
Commits
16945391
Commit
16945391
authored
Jul 26, 2012
by
John Koleszar
Committed by
Gerrit Code Review
Jul 26, 2012
Browse files
Merge "shared object on mac osx" into experimental
parents
10a49284
45e551b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
build/make/Makefile
View file @
16945391
...
...
@@ -249,10 +249,25 @@ $(1):
$(
if
$(quiet)
,@echo
" [LD]
$$
@"
)
$(qexec)
$
$(LD)
-shared
$
$(LDFLAGS)
\
-Wl
,--no-undefined
-Wl
,-soname,
$
$(SONAME)
\
-Wl
,--version-script,
$
$(
SO_VERSION_SCRIPT
)
-o
$$
@
\
-Wl
,--version-script,
$
$(
EXPORTS_FILE
)
-o
$$
@
\
$
$(
filter
%.o,
$$
^
)
$
$(extralibs)
endef
define
dl_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
# for creating them.
$(1)
:
$(
if
$(quiet)
,@echo
" [LD]
$$
@"
)
$(qexec)
$
$(LD)
-dynamiclib
$
$(LDFLAGS)
\
-exported_symbols_list
$
$(EXPORTS_FILE)
\
-Wl
,-headerpad_max_install_names,-compatibility_version,1.0,-current_version,
$
$(VERSION_MAJOR)
\
-o
$$
@
\
$
$(
filter
%.o,
$$
^
)
$
$(extralibs)
endef
define
lipo_lib_template
$(1)
:
$(addsuffix /$(1)
,
$(FAT_ARCHS))
$(
if
$(quiet)
,@echo
" [LIPO]
$$
@"
)
...
...
@@ -317,6 +332,7 @@ LIBS=$(call enabled,LIBS)
@
touch
$@
$(foreach
lib,$(filter
%_g.a,$(LIBS)),$(eval
$(call
archive_template,$(lib))))
$(foreach
lib,$(filter
%so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH),$(LIBS)),$(eval
$(call
so_template,$(lib))))
$(foreach
lib,$(filter
%$(VERSION_MAJOR).dylib,$(LIBS)),$(eval
$(call
dl_template,$(lib))))
INSTALL-LIBS
=
$(
call
cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS
)
ifeq
($(MAKECMDGOALS),dist)
...
...
configure
View file @
16945391
...
...
@@ -453,12 +453,6 @@ EOF
}
process_detect
()
{
if
enabled shared
;
then
# Can only build shared libs on a subset of platforms. Doing this check
# here rather than at option parse time because the target auto-detect
# magic happens after the command line has been parsed.
enabled linux
||
enabled win32
||
enabled win64
||
die
"--enable-shared only supported on ELF for now"
fi
if
[
-z
"
$CC
"
]
;
then
echo
"Bypassing toolchain for environment detection."
enable
external_build
...
...
examples.mk
View file @
16945391
...
...
@@ -162,7 +162,8 @@ BINS-$(NOT_MSVS) += $(addprefix $(BUILD_PFX),$(ALL_EXAMPLES:.c=))
# Instantiate linker template for all examples.
CODEC_LIB
=
$(
if
$(CONFIG_DEBUG_LIBS)
,vpx_g,vpx
)
CODEC_LIB_SUF
=
$(
if
$(CONFIG_SHARED)
,.so,.a
)
SHARED_LIB_SUF
=
$(
if
$(
filter
darwin%,
$(TGT_OS)
)
,.dylib,.so
)
CODEC_LIB_SUF
=
$(
if
$(CONFIG_SHARED)
,
$(SHARED_LIB_SUF)
,.a
)
$(foreach
bin,$(BINS-yes),\
$(if $(BUILD_OBJS),$(eval $(bin)
:
\
$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF)))
\
...
...
libs.mk
View file @
16945391
...
...
@@ -193,17 +193,29 @@ OBJS-$(BUILD_LIBVPX) += $(LIBVPX_OBJS)
LIBS-$(if
$(BUILD_LIBVPX),
$(CONFIG_STATIC))
+=
$(BUILD_PFX)
libvpx.a
$(BUILD_PFX)
libvpx_g.a
$(BUILD_PFX)libvpx_g.a
:
$(LIBVPX_OBJS)
BUILD_LIBVPX_SO
:=
$(
if
$(BUILD_LIBVPX)
,
$(CONFIG_SHARED)
)
ifeq
($(filter darwin%,$(TGT_OS)),$(TGT_OS))
LIBVPX_SO
:=
libvpx.
$(VERSION_MAJOR)
.dylib
EXPORT_FILE
:=
libvpx.syms
LIBVPX_SO_SYMLINKS
:=
$(
addprefix
$(LIBSUBDIR)
/,
\
libvpx.dylib
)
else
LIBVPX_SO
:=
libvpx.so.
$(VERSION_MAJOR)
.
$(VERSION_MINOR)
.
$(VERSION_PATCH)
EXPORT_FILE
:=
libvpx.ver
SYM_LINK
:=
libvpx.so
LIBVPX_SO_SYMLINKS
:=
$(
addprefix
$(LIBSUBDIR)
/,
\
libvpx.so libvpx.so.
$(VERSION_MAJOR)
\
libvpx.so.
$(VERSION_MAJOR)
.
$(VERSION_MINOR)
)
endif
LIBS-$(BUILD_LIBVPX_SO)
+=
$(BUILD_PFX)$(LIBVPX_SO)
\
$(
notdir
$(LIBVPX_SO_SYMLINKS)
)
$(BUILD_PFX)$(LIBVPX_SO)
:
$(LIBVPX_OBJS)
libvpx.ver
$(BUILD_PFX)$(LIBVPX_SO)
:
$(LIBVPX_OBJS)
$(EXPORT_FILE)
$(BUILD_PFX)$(LIBVPX_SO)
:
extralibs += -lm
$(BUILD_PFX)$(LIBVPX_SO)
:
SONAME = libvpx.so.$(VERSION_MAJOR)
$(BUILD_PFX)$(LIBVPX_SO)
:
SO_VERSION_SCRIPT = libvpx.ver
LIBVPX_SO_SYMLINKS
:=
$(
addprefix
$(LIBSUBDIR)
/,
\
libvpx.so libvpx.so.
$(VERSION_MAJOR)
\
libvpx.so.
$(VERSION_MAJOR)
.
$(VERSION_MINOR)
)
$(BUILD_PFX)$(LIBVPX_SO)
:
EXPORTS_FILE = $(EXPORT_FILE)
libvpx.ver
:
$(call enabled
,
CODEC_EXPORTS)
@
echo
" [CREATE]
$@
"
...
...
@@ -212,10 +224,15 @@ libvpx.ver: $(call enabled,CODEC_EXPORTS)
$(qexec)
echo
"local: *; };"
>>
$@
CLEAN-OBJS
+=
libvpx.ver
libvpx.syms
:
$(call enabled
,
CODEC_EXPORTS)
@
echo
" [CREATE]
$@
"
$(qexec)
awk
'{print "_"$$2}'
$^
>
$@
CLEAN-OBJS
+=
libvpx.syms
define
libvpx_symlink_template
$(1)
:
$(2)
@
echo
" [LN]
$$
@"
$(qexec)
ln
-sf
$(
LIBVPX_SO
)
$$
@
@
echo
" [LN]
$(2)
$$
@"
$(qexec)
ln
-sf
$(
2
)
$$
@
endef
$(eval
$(call
libvpx_symlink_template,\
...
...
@@ -225,8 +242,10 @@ $(eval $(call libvpx_symlink_template,\
$(addprefix
$(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)),\
$(DIST_DIR)/$(LIBSUBDIR)/$(LIBVPX_SO)))
INSTALL-LIBS-$(CONFIG_SHARED)
+=
$(LIBVPX_SO_SYMLINKS)
INSTALL-LIBS-$(CONFIG_SHARED)
+=
$(LIBSUBDIR)
/
$(LIBVPX_SO)
INSTALL-LIBS-$(BUILD_LIBVPX_SO)
+=
$(LIBVPX_SO_SYMLINKS)
INSTALL-LIBS-$(BUILD_LIBVPX_SO)
+=
$(LIBSUBDIR)
/
$(LIBVPX_SO)
LIBS-$(BUILD_LIBVPX)
+=
vpx.pc
vpx.pc
:
config.mk libs.mk
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment