diff --git a/.gitmodules b/.gitmodules index d4fe4437..ebf855aa 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/client/Makefile b/client/Makefile index b0ad13db..41bcb552 100644 --- a/client/Makefile +++ b/client/Makefile @@ -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) diff --git a/client/build_android.sh b/client/build_android.sh index 1c5a7efe..673e2fd6 100755 --- a/client/build_android.sh +++ b/client/build_android.sh @@ -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 diff --git a/externals/Makefile b/externals/Makefile index d4974fe9..58425274 100644 --- a/externals/Makefile +++ b/externals/Makefile @@ -14,9 +14,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -.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)"; \ diff --git a/externals/opus b/externals/opus new file mode 160000 index 00000000..93b373e8 --- /dev/null +++ b/externals/opus @@ -0,0 +1 @@ +Subproject commit 93b373e884915e802188cec844a7dda2fa184ebc