mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-02 03:37:00 +02:00
Add Opus to Android make targets
This commit is contained in:
parent
5da2df1e48
commit
6c819b8f0c
5 changed files with 20 additions and 5 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -7,3 +7,6 @@
|
|||
[submodule "externals/tremor"]
|
||||
path = externals/tremor
|
||||
url = https://git.xiph.org/tremor.git
|
||||
[submodule "externals/opus"]
|
||||
path = externals/opus
|
||||
url = https://git.xiph.org/opus.git
|
||||
|
|
|
@ -59,7 +59,7 @@ ifeq ($(TARGET), ANDROID)
|
|||
|
||||
CXX = $(PROGRAM_PREFIX)clang++
|
||||
CXXFLAGS += -pthread -fPIC -DHAS_TREMOR -DHAS_OPENSL -I$(NDK_DIR)/include
|
||||
LDFLAGS = -L$(NDK_DIR)/lib -pie -lvorbisidec -logg -lFLAC -lOpenSLES -latomic -llog -static-libstdc++
|
||||
LDFLAGS = -L$(NDK_DIR)/lib -pie -lvorbisidec -logg -lopus -lFLAC -lOpenSLES -latomic -llog -static-libstdc++
|
||||
OBJ += player/opensl_player.o
|
||||
|
||||
else ifeq ($(TARGET), OPENWRT)
|
||||
|
|
|
@ -13,11 +13,11 @@ fi
|
|||
if [ -n "$NDK_DIR_ARM" ]; then
|
||||
export NDK_DIR="$NDK_DIR_ARM"
|
||||
export ARCH=arm
|
||||
make clean; make TARGET=ANDROID -j 4; mv ./snapclient "$ASSETS_DIR/bin/armeabi/"
|
||||
make clean; make TARGET=ANDROID -j 4; $NDK_DIR/bin/arm-linux-android-strip ./snapclient; mv ./snapclient "$ASSETS_DIR/bin/armeabi/"
|
||||
fi
|
||||
|
||||
if [ -n "$NDK_DIR_X86" ]; then
|
||||
export NDK_DIR="$NDK_DIR_X86"
|
||||
export ARCH=x86
|
||||
make clean; make TARGET=ANDROID -j 4; mv ./snapclient "$ASSETS_DIR/bin/x86/"
|
||||
make clean; make TARGET=ANDROID -j 4; $NDK_DIR/bin/i686-linux-android-strip ./snapclient; mv ./snapclient "$ASSETS_DIR/bin/x86/"
|
||||
fi
|
||||
|
|
15
externals/Makefile
vendored
15
externals/Makefile
vendored
|
@ -14,9 +14,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
.PHONY: all check-env flac ogg tremor
|
||||
.PHONY: all check-env flac ogg opus tremor
|
||||
|
||||
all: flac ogg tremor
|
||||
all: flac ogg opus tremor
|
||||
|
||||
check-env:
|
||||
# if [ ! -d "flac" ]; then \
|
||||
|
@ -69,6 +69,17 @@ ogg: check-env
|
|||
make install; \
|
||||
make clean;
|
||||
|
||||
opus: check-env
|
||||
@cd opus; \
|
||||
export CC="$(CC)"; \
|
||||
export CXX="$(CXX)"; \
|
||||
export CPPFLAGS="$(CPPFLAGS)"; \
|
||||
./autogen.sh; \
|
||||
./configure --host=$(ARCH) --prefix=$(NDK_DIR); \
|
||||
make; \
|
||||
make install; \
|
||||
make clean;
|
||||
|
||||
tremor: check-env
|
||||
@cd tremor; \
|
||||
export CC="$(CC)"; \
|
||||
|
|
1
externals/opus
vendored
Submodule
1
externals/opus
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 93b373e884915e802188cec844a7dda2fa184ebc
|
Loading…
Add table
Reference in a new issue