Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[droid] make prefix and extension configurable per-platform

This is a nasty hack, but one that was used fo vis and screensavers as well.
Android libs must be of the form "^lib.*\.so$" in order to be shipped in the
apk.
  • Loading branch information...
commit 7c3589b8172d5584d5fe7f1a95cfada2688bc0a0 1 parent a82b35c
Cory Fields authored
Showing with 14 additions and 8 deletions.
  1. +8 −8 addons/Makefile.include.am
  2. +6 −0 configure.ac
View
16 addons/Makefile.include.am
@@ -6,23 +6,23 @@ INCLUDES = -I. -I$(abs_top_srcdir)/xbmc -I$(abs_top_srcdir)/lib @HOST_INC
WARNINGS = -Wall -Wextra -Wno-missing-field-initializers -Woverloaded-virtual -Wno-parentheses
DEFINES = @ARCH_DEFINES@ -DUSE_DEMUX -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
AM_CXXFLAGS = -g -O2 -fPIC $(WARNINGS) $(DEFINES) @HOST_CXXFLAGS@
-LIB = @abs_top_srcdir@/addons/$(ADDONNAME)/addon/$(ADDONBINNAME).pvr
+LIB = @abs_top_srcdir@/addons/$(ADDONNAME)/addon/@BINPREFIX@$(ADDONBINNAME)@BIN_EXT@
clean:
- -rm -r -f $(LIB) $(ADDONBINNAME).pvr @abs_top_srcdir@/addons/$(ADDONNAME).@OS@-@ARCHITECTURE@.zip @abs_top_srcdir@/addons/.build/$(ADDONNAME) *.so *.lo *.o *.la *.a *.P *~
+ -rm -r -f $(LIB) @BINPREFIX@$(ADDONBINNAME)@BIN_EXT@ @abs_top_srcdir@/addons/$(ADDONNAME).@OS@-@ARCHITECTURE@.zip @abs_top_srcdir@/addons/.build/$(ADDONNAME) *.so *.lo *.o *.la *.a *.P *~
if IS_INTREE_BUILD
rm -rf ../../../addons/$(ADDONNAME)
endif
release: $(lib_LTLIBRARIES)
- cp -f .libs/$(LIBNAME).@DYN_LIB_EXT@ $(ADDONBINNAME).pvr
- $(STRIP) -x $(ADDONBINNAME).pvr
+ cp -f .libs/$(LIBNAME).@DYN_LIB_EXT@ @BINPREFIX@$(ADDONBINNAME)@BIN_EXT@
+ $(STRIP) -x @BINPREFIX@$(ADDONBINNAME)@BIN_EXT@
debug: $(lib_LTLIBRARIES)
- cp -f .libs/$(LIBNAME).@DYN_LIB_EXT@ $(ADDONBINNAME).pvr
+ cp -f .libs/$(LIBNAME).@DYN_LIB_EXT@ @BINPREFIX@$(ADDONBINNAME)@BIN_EXT@
$(LIB): @BUILD_TYPE@
- cp -f $(ADDONBINNAME).pvr $(LIB)
+ cp -f @BINPREFIX@$(ADDONBINNAME)@BIN_EXT@ $(LIB)
zip: $(LIB)
mkdir -p @abs_top_srcdir@/addons/.build
@@ -35,7 +35,7 @@ if IS_INTREE_BUILD
else
mkdir -m 755 -p $(DESTDIR)@LIBDIR@/$(ADDONNAME)
mkdir -m 755 -p $(DESTDIR)@DATADIR@/$(ADDONNAME)
- cp -f $(ADDONBINNAME).pvr $(DESTDIR)@LIBDIR@/$(ADDONNAME) ; chmod 655 $(DESTDIR)@LIBDIR@/$(ADDONNAME)/$(ADDONBINNAME).pvr
+ cp -f @BINPREFIX@$(ADDONBINNAME)@BIN_EXT@ $(DESTDIR)@LIBDIR@/$(ADDONNAME) ; chmod 655 $(DESTDIR)@LIBDIR@/$(ADDONNAME)/@BINPREFIX@$(ADDONBINNAME)@BIN_EXT@
cp -r -f @abs_top_srcdir@/addons/$(ADDONNAME)/addon/* $(DESTDIR)@DATADIR@/$(ADDONNAME) ; chmod -R o+rx $(DESTDIR)@DATADIR@/$(ADDONNAME)
endif
@@ -44,5 +44,5 @@ if IS_INTREE_BUILD
@echo "copying pvr-addons to xbmc/addons"
rm -rf ../../../addons/$(ADDONNAME)
cp -r -p -f @abs_top_srcdir@/addons/$(ADDONNAME)/addon ../../../addons/$(ADDONNAME)
- cp -f -p $(ADDONBINNAME).pvr ../../../addons/$(ADDONNAME)
+ cp -f -p @BINPREFIX@$(ADDONBINNAME)@BIN_EXT@ ../../../addons/$(ADDONNAME)
endif
View
6 configure.ac
@@ -34,11 +34,15 @@ HOST_CXXFLAGS=""
ARCH_DEFINES="-DTARGET_POSIX -DTARGET_LINUX -D_LINUX"
DYN_LIB_EXT="so"
TARGET_LDFLAGS=""
+BIN_EXT=".pvr"
+BINPREFIX=""
case "${host}" in
arm-*-linux-androideabi)
TARGET_LDFLAGS="-avoid-version -no-undefined"
OS="android"
ARCHITECTURE="arm"
+ BIN_EXT=".so"
+ BINPREFIX="lib"
;;
arm*-*-linux*)
OS="linux"
@@ -98,6 +102,8 @@ AC_SUBST(OS)
AC_SUBST(ARCH_DEFINES)
AC_SUBST(DYN_LIB_EXT)
AC_SUBST(TARGET_LDFLAGS)
+AC_SUBST(BINPREFIX)
+AC_SUBST(BIN_EXT)
if test "x$host_os_osx" = "xyes"; then
AM_CONDITIONAL(HOST_IS_OSX, true)
Please sign in to comment.
Something went wrong with that request. Please try again.