[Android] [PATCH 2/5] fix find_module
Thomas Guillem
thomas at gllm.fr
Mon Feb 9 14:38:03 CET 2015
vlc_entry__ symbols are not necessarily named like the .a file, so use nm to
find the good symbol.
---
compile-libvlc.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 54d077f..8844a02 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -480,9 +480,9 @@ VLC_MODULES=`./find_modules.sh vlc/$VLC_BUILD_DIR`
DEFINITION="";
BUILTINS="const void *vlc_static_modules[] = {\n";
for file in $VLC_MODULES; do
- name=`echo $file | sed 's/.*\.libs\/lib//' | sed 's/_plugin\.a//'`; \
- DEFINITION=$DEFINITION"int vlc_entry__$name (int (*)(void *, void *, int, ...), void *);\n"; \
- BUILTINS="$BUILTINS vlc_entry__$name,\n"; \
+ symbol=`"${CROSS_COMPILE}nm" -g $file | grep vlc_entry__|cut -d" " -f 3`
+ DEFINITION=$DEFINITION"int $symbol (int (*)(void *, void *, int, ...), void *);\n"; \
+ BUILTINS="$BUILTINS $symbol,\n"; \
done; \
BUILTINS="$BUILTINS NULL\n};\n"; \
printf "/* Autogenerated from the list of modules */\n $DEFINITION\n $BUILTINS\n" > libvlc/jni/libvlcjni.h
--
2.1.3
More information about the Android
mailing list