Initial commit

added libraries:
opus
flac
libsndfile

updated:
libvorbis
libogg
openal

- Everything works as expected for now. Bare in mind libsndfile needed the check for whether or not it could find the xiph libraries removed in order for this to work.
This commit is contained in:
marauder2k7 2024-03-21 17:33:47 +00:00
parent 05a083ca6f
commit a745fc3757
1954 changed files with 431332 additions and 21037 deletions

View file

@ -0,0 +1,96 @@
#!/bin/bash -e
# Copyright (C) 2013-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Neither the author nor the names of any contributors may be used
# to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Android NDK version number; eg r10, r10b etc
ANDROID_NDK_VER=${ANDROID_NDK_VER:-r10}
# Android NDK gcc version; eg 4.8, 4.9 etc.
ANDROID_GCC_VER=${ANDROID_GCC_VER:-4.9}
# Android API version; eg 14 (Android 4.0), 21 (Android 5.0) etc.
ANDROID_API_VER=${ANDROID_API_VER:-14}
ANDROID_TARGET=${ANDROID_TARGET:-arm-linux-androideabi}
if test -z ${ANDROID_TOOLCHAIN_HOME} ; then
echo "Environment variable ANDROID_TOOLCHAIN_HOME not defined."
echo "This should point to the directory containing the Android NDK."
exit 1
fi
#-------------------------------------------------------------------------------
# No more user config beyond here.
BUILD_MACHINE=$(uname -s | tr 'A-Z' 'a-z')-$(uname -m)
function die_with {
echo $1
exit 1
}
export CROSS_COMPILE=${ANDROID_TARGET}
# Don't forget to adjust this to your NDK path
export ANDROID_NDK=${ANDROID_TOOLCHAIN_HOME}/android-ndk-${ANDROID_NDK_VER}
test -d ${ANDROID_NDK} || die_with "Error : ANDROID_NDK '$ANDROID_NDK' does not exist."
export ANDROID_PREFIX=${ANDROID_NDK}/toolchains/arm-linux-androideabi-${ANDROID_GCC_VER}/prebuilt/${BUILD_MACHINE}
test -d ${ANDROID_PREFIX} || die_with "Error : ANDROID_PREFIX '$ANDROID_PREFIX' does not exist."
export SYSROOT=${ANDROID_NDK}/platforms/android-${ANDROID_API_VER}/arch-arm
test -d ${SYSROOT} || die_with "Error : SYSROOT '$SYSROOT' does not exist."
export CROSS_PREFIX=${ANDROID_PREFIX}/bin/${CROSS_COMPILE}
test -f ${CROSS_PREFIX}-gcc || die_with "Error : CROSS_PREFIX compiler '${CROSS_PREFIX}-gcc' does not exist."
# Non-exhaustive lists of compiler + binutils
# Depending on what you compile, you might need more binutils than that
export CPP=${CROSS_PREFIX}-cpp
export AR=${CROSS_PREFIX}-ar
export AS=${CROSS_PREFIX}-as
export NM=${CROSS_PREFIX}-nm
export CC=${CROSS_PREFIX}-gcc
export CXX=${CROSS_PREFIX}-g++
export LD=${CROSS_PREFIX}-ld
export RANLIB=${CROSS_PREFIX}-ranlib
# Don't mix up .pc files from your host and build target
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
# Set up the needed FLAGS.
export CFLAGS="${CFLAGS} -gstabs --sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${ANDROID_PREFIX}/include"
export CXXFLAGS="${CXXFLAGS} -gstabs -fno-exceptions --sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${ANDROID_PREFIX}/include -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/include/ -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/libs/armeabi/include"
export CPPFLAGS="${CFLAGS}"
export LDFLAGS="${LDFLAGS} -L${SYSROOT}/usr/lib -L${ANDROID_PREFIX}/lib"
# Create a symlink to the gdbclient.
test -h gdbclient || ln -s ${ANDROID_PREFIX}/bin/arm-linux-androideabi-gdb gdbclient
./configure --host=${CROSS_COMPILE} --with-sysroot=${SYSROOT} "$@"

View file

@ -0,0 +1,4 @@
#!/bin/bash -eu
CFLAGS="-fsanitize=address -g" CXXFLAGS=${CFLAGS} ./configure

View file

@ -0,0 +1,61 @@
#!/usr/bin/make -f
# This is probably only going to work with GNU Make.
# This in a separate file instead of in Makefile.am because Automake complains
# about the GNU Make-isms.
EXEEXT = @EXEEXT@
PACKAGE_VERSION = @PACKAGE_VERSION@
HOST_TRIPLET = @HOST_TRIPLET@
SRC_BINDIR = @SRC_BINDIR@
TEST_BINDIR = @TEST_BINDIR@
LIBRARY := $(SRC_BINDIR)libsndfile.so.$(LIB_VERSION)
LIB_VERSION := $(shell echo $(PACKAGE_VERSION) | sed -e 's/[a-z].*//')
TESTNAME = libsndfile-testsuite-$(HOST_TRIPLET)-$(PACKAGE_VERSION)
TARBALL = $(TESTNAME).tar.gz
# Find the test programs by grepping the script for the programs it executes.
testprogs := $(shell grep '^\./' tests/test_wrapper.sh | sed -e "s|./||" -e "s/ .*//" | sort | uniq)
# Also add the programs not found by the above.
testprogs += tests/sfversion$(EXEEXT) tests/stdin_test$(EXEEXT) tests/stdout_test$(EXEEXT) \
tests/cpp_test$(EXEEXT) tests/win32_test$(EXEEXT)
libfiles := $(shell if test ! -z $(EXEEXT) ; then echo "src/libsndfile-1.def src/.libs/libsndfile-1.dll" ; elif test -f $(LIBRARY) ; then echo $(LIBRARY) ; fi ; fi)
testbins := $(testprogs) $(libfiles)
all : $(TARBALL)
clean :
rm -rf $(TARBALL) $(TESTNAME)/
check : $(TESTNAME)/test_wrapper.sh
(cd ./$(TESTNAME)/ && ./test_wrapper.sh)
$(TARBALL) : $(TESTNAME)/test_wrapper.sh
tar zcf $@ $(TESTNAME)
rm -rf $(TESTNAME)
@echo
@echo "Created : $(TARBALL)"
@echo
$(TESTNAME)/test_wrapper.sh : tests/test_wrapper.sh tests/pedantic-header-test.sh
rm -rf $(TESTNAME)
mkdir -p $(TESTNAME)/tests/
echo
echo $(testbins)
echo
cp $(testbins) $(TESTNAME)/tests/
cp tests/test_wrapper.sh $(TESTNAME)/
cp tests/pedantic-header-test.sh $(TESTNAME)/tests/
chmod u+x $@
tests/test_wrapper.sh : tests/test_wrapper.sh.in
make $@

View file

@ -0,0 +1,13 @@
#!/bin/bash
# This is known to work with clang-3.4 from Debian testing/unstable.
# 2013/07/14
export CC=clang
export CXX=clang++
export CFLAGS="-O3 -fsanitize=address,integer,undefined"
export CXXFLAGS="-O3 -fsanitize=address,integer,undefined"
./configure --enable-gcc-werror
make clean all check

View file

@ -0,0 +1,9 @@
#!/bin/bash -eu
rm -rf CMakeCache.txt CMakeFiles/ _Build
mkdir _Build
cd _Build
cmake ..
cmake --build .
ctest -V

View file

@ -0,0 +1,256 @@
#!/usr/bin/python -tt
#
# Copyright (C) 2005-2017 Erik de Castro Lopo <erikd@mega-nerd.com>
#
# Released under the 2 clause BSD license.
"""
This program checks C code for compliance to coding standards used in
libsndfile and other projects I run.
"""
import re
import sys
class Preprocessor:
"""
Preprocess lines of C code to make it easier for the CStyleChecker class to
test for correctness. Preprocessing works on a single line at a time but
maintains state between consecutive lines so it can preprocessess multi-line
comments.
Preprocessing involves:
- Strip C++ style comments from a line.
- Strip C comments from a series of lines. When a C comment starts and
ends on the same line it will be replaced with 'comment'.
- Replace arbitrary C strings with the zero length string.
- Replace '#define f(x)' with '#define f (c)' (The C #define requires that
there be no space between defined macro name and the open paren of the
argument list).
Used by the CStyleChecker class.
"""
def __init__ (self):
self.comment_nest = 0
self.leading_space_re = re.compile ('^(\t+| )')
self.trailing_space_re = re.compile ('(\t+| )$')
self.define_hack_re = re.compile ("(#\s*define\s+[a-zA-Z0-9_]+)\(")
def comment_nesting (self):
"""
Return the currect comment nesting. At the start and end of the file,
this value should be zero. Inside C comments it should be 1 or
(possibly) more.
"""
return self.comment_nest
def __call__ (self, line):
"""
Strip the provided line of C and C++ comments. Stripping of multi-line
C comments works as expected.
"""
line = self.define_hack_re.sub (r'\1 (', line)
line = self.process_strings (line)
# Strip C++ style comments.
if self.comment_nest == 0:
line = re.sub ("( |\t*)//.*", '', line)
# Strip C style comments.
open_comment = line.find ('/*')
close_comment = line.find ('*/')
if self.comment_nest > 0 and close_comment < 0:
# Inside a comment block that does not close on this line.
return ""
if open_comment >= 0 and close_comment < 0:
# A comment begins on this line but doesn't close on this line.
self.comment_nest += 1
return self.trailing_space_re.sub ('', line [:open_comment])
if open_comment < 0 and close_comment >= 0:
# Currently open comment ends on this line.
self.comment_nest -= 1
return self.trailing_space_re.sub ('', line [close_comment + 2:])
if open_comment >= 0 and close_comment > 0 and self.comment_nest == 0:
# Comment begins and ends on this line. Replace it with 'comment'
# so we don't need to check whitespace before and after the comment
# we're removing.
newline = line [:open_comment] + "comment" + line [close_comment + 2:]
return self.__call__ (newline)
return line
def process_strings (self, line):
"""
Given a line of C code, return a string where all literal C strings have
been replaced with the empty string literal "".
"""
for k in range (0, len (line)):
if line [k] == '"':
start = k
for k in range (start + 1, len (line)):
if line [k] == '"' and line [k - 1] != '\\':
return line [:start + 1] + '"' + self.process_strings (line [k + 1:])
return line
class CStyleChecker:
"""
A class for checking the whitespace and layout of a C code.
"""
def __init__ (self, debug):
self.debug = debug
self.filename = None
self.error_count = 0
self.line_num = 1
self.orig_line = ''
self.trailing_newline_re = re.compile ('[\r\n]+$')
self.indent_re = re.compile ("^\s*")
self.last_line_indent = ""
self.last_line_indent_curly = False
self.re_checks = \
[ ( re.compile (" "), "multiple space instead of tab" )
, ( re.compile ("\t "), "space after tab" )
, ( re.compile ("[^ ];"), "missing space before semi-colon" )
, ( re.compile ("{[^\s}]"), "missing space after open brace" )
, ( re.compile ("[^{\s]}"), "missing space before close brace" )
, ( re.compile ("[ \t]+$"), "contains trailing whitespace" )
, ( re.compile (",[^\s\n]"), "missing space after comma" )
, ( re.compile (";[^\s]"), "missing space after semi-colon" )
, ( re.compile ("=[^\s\"'=]"), "missing space after assignment" )
# Open and close parenthesis.
, ( re.compile ("[^\s\(\[\*&']\("), "missing space before open parenthesis" )
, ( re.compile ("\)(-[^>]|[^,'\s\n\)\]-])"), "missing space after close parenthesis" )
, ( re.compile ("\s(do|for|if|when)\s.*{$"), "trailing open parenthesis at end of line" )
, ( re.compile ("\( [^;]"), "space after open parenthesis" )
, ( re.compile ("[^;] \)"), "space before close parenthesis" )
# Open and close square brace.
, ( re.compile ("[^\s\(\]]\["), "missing space before open square brace" )
, ( re.compile ("\][^,\)\]\[\s\.-]"), "missing space after close square brace" )
, ( re.compile ("\[ "), "space after open square brace" )
, ( re.compile (" \]"), "space before close square brace" )
# Space around operators.
, ( re.compile ("[^\s][\*/%+-][=][^\s]"), "missing space around opassign" )
, ( re.compile ("[^\s][<>!=^/][=]{1,2}[^\s]"), "missing space around comparison" )
# Parens around single argument to return.
, ( re.compile ("\s+return\s+\([a-zA-Z0-9_]+\)\s+;"), "parens around return value" )
# Parens around single case argument.
, ( re.compile ("\s+case\s+\([a-zA-Z0-9_]+\)\s+:"), "parens around single case argument" )
# Open curly at end of line.
, ( re.compile ("\)\s*{\s*$"), "open curly brace at end of line" )
# Pre and post increment/decrment.
, ( re.compile ("[^\(\[][+-]{2}[a-zA-Z0-9_]"), "space after pre increment/decrement" )
, ( re.compile ("[a-zA-Z0-9_][+-]{2}[^\)\,]]"), "space before post increment/decrement" )
]
def get_error_count (self):
"""
Return the current error count for this CStyleChecker object.
"""
return self.error_count
def check_files (self, files):
"""
Run the style checker on all the specified files.
"""
for filename in files:
self.check_file (filename)
def check_file (self, filename):
"""
Run the style checker on the specified file.
"""
self.filename = filename
cfile = open (filename, "r")
self.line_num = 1
preprocess = Preprocessor ()
while 1:
line = cfile.readline ()
if not line:
break
line = self.trailing_newline_re.sub ('', line)
self.orig_line = line
self.line_checks (preprocess (line))
self.line_num += 1
cfile.close ()
self.filename = None
# Check for errors finding comments.
if preprocess.comment_nesting () != 0:
print ("Weird, comments nested incorrectly.")
sys.exit (1)
return
def line_checks (self, line):
"""
Run the style checker on provided line of text, but within the context
of how the line fits within the file.
"""
indent = len (self.indent_re.search (line).group ())
if re.search ("^\s+}", line):
if not self.last_line_indent_curly and indent != self.last_line_indent:
None # self.error ("bad indent on close curly brace")
self.last_line_indent_curly = True
else:
self.last_line_indent_curly = False
# Now all the regex checks.
for (check_re, msg) in self.re_checks:
if check_re.search (line):
self.error (msg)
if re.search ("[a-zA-Z0-9][<>!=^/&\|]{1,2}[a-zA-Z0-9]", line):
if not re.search (".*#include.*[a-zA-Z0-9]/[a-zA-Z]", line):
self.error ("missing space around operator")
self.last_line_indent = indent
return
def error (self, msg):
"""
Print an error message and increment the error count.
"""
print ("%s (%d) : %s" % (self.filename, self.line_num, msg))
if self.debug:
print ("'" + self.orig_line + "'")
self.error_count += 1
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if len (sys.argv) < 1:
print ("Usage : yada yada")
sys.exit (1)
# Create a new CStyleChecker object
if sys.argv [1] == '-d' or sys.argv [1] == '--debug':
cstyle = CStyleChecker (True)
cstyle.check_files (sys.argv [2:])
else:
cstyle = CStyleChecker (False)
cstyle.check_files (sys.argv [1:])
if cstyle.get_error_count ():
sys.exit (1)
sys.exit (0)

View file

@ -0,0 +1,84 @@
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1 ; then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
# Redirect output to stderr.
exec 1>&2
#-------------------------------------------------------------------------------
# Prevent files with non-ascii filenames from being committed.
if test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 ; then
echo "Error: Attempt to add a non-ascii file name."
echo
echo "This can cause problems if you want to work"
echo "with people on other platforms."
echo
echo "To be portable it is advisable to rename the file ..."
echo
echo "Commit aborted."
exit 1
fi
#-------------------------------------------------------------------------------
# Check the formatting of all C files.
# http://man.openbsd.org/sed#r
# http://man.openbsd.org/sed#E
# http://netbsd.gw.com/cgi-bin/man-cgi?sed++NetBSD-current
# https://github.com/freebsd/freebsd/blob/master/usr.bin/sed/main.c
# http://git.savannah.gnu.org/gitweb/?p=sed.git;a=blob;f=sed/sed.c
# GNU has -r and -E (undocumented); MacOS has -E but not -r; Sunos has neither.
files=$(git diff-index --name-status --cached HEAD | grep -v ^D | sed -E "s/^[A-Z]+[A-Z0-9]*[ \t]+/ /")
cfiles=""
for f in $files ; do
if test `dirname $f` = "src/ALAC" ; then
echo "Skipping cstyle checking on $f"
elif test `echo $f | grep -c "\.[ch]$"` -gt 0 ; then
cfiles="$cfiles $f"
fi
done
if test -n "$cfiles" ; then
Scripts/cstyle.py $cfiles
if test $? -ne 0 ; then
echo
echo "Commit aborted. Fix the above error before trying again."
exit 1
fi
fi
#-------------------------------------------------------------------------------
# Check the copyright notice of all files to be commited.
user=`git config --global user.email`
year=`date +"%Y"`
missing_copyright_year=""
if test $user = "erikd@mega-nerd.com" ; then
for f in $files ; do
if test `head -5 $f | grep -i copyright | grep -c -i $user` -gt 0 ; then
user_copyright=`grep -i copyright $f | grep $user | grep -c $year`
if test $user_copyright -lt 1 ; then
missing_copyright_year="$missing_copyright_year $f"
fi
fi
done
fi
if test -n "$missing_copyright_year" ; then
echo "Missing current year in the copyright notice of the following files:"
for f in $missing_copyright_year ; do
echo " $f"
done
echo "Commit aborted."
exit 1
fi
exit 0

View file

@ -0,0 +1,22 @@
#!/bin/bash
case "$1" in
w32)
compiler_name=i686-w64-mingw32
;;
w64)
compiler_name=x86_64-w64-mingw32
;;
*)
echo "$0 (w32|w64) <other args>"
exit 0
;;
esac
shift
build_cpu=$(dpkg-architecture -qDEB_BUILD_GNU_CPU)
build_host=$build_cpu-linux
./configure --host=$compiler_name --target=$compiler_name --build=$build_host \
--program-prefix='' --disable-sqlite --disable-static $@

View file

@ -0,0 +1,125 @@
#!/usr/bin/make -f
# If this is set to true (via the environment) then CRC checking will be
# disabled in libogg giving fuzzers a better chance at finding something.
disable_ogg_crc ?= false
# Build libsndfile as a dynamic/shared library, but statically link to
# libFLAC, libogg, libopus and libvorbis
ogg_version = libogg-1.3.4
ogg_sha256sum = c163bc12bc300c401b6aa35907ac682671ea376f13ae0969a220f7ddf71893fe
vorbis_version = libvorbis-1.3.7
vorbis_sha256sum = b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b
flac_version = flac-1.3.3
flac_sha256sum = 213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748
opus_version = opus-1.3.1
opus_sha256sum = 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d
#-------------------------------------------------------------------------------
# Code follows.
ogg_tarball = $(ogg_version).tar.xz
vorbis_tarball = $(vorbis_version).tar.xz
flac_tarball = $(flac_version).tar.xz
opus_tarball = $(opus_version).tar.gz
download_url = http://downloads.xiph.org/releases/
tarball_dir = Build/Tarballs
stamp_dir = Build/Stamp
build_dir = $(shell pwd)/Build
config_options = --prefix=$(build_dir) --disable-shared --enable-option-checking
pwd = $(shell pwd)
help :
@echo
@echo "This script will build libsndfile as a dynamic/shared library but statically linked"
@echo "to libFLAC, libogg and libvorbis. It should work on Linux and Mac OS X. It might"
@echo "work on Windows with a correctly set up MinGW."
@echo
@echo "It requires all the normal build tools require to build libsndfile plus wget."
@echo
config : Build/Stamp/configure
build : Build/Stamp/build
clean :
rm -rf Build/flac-* Build/libogg-* Build/libvorbis-* Build/opus-*
rm -rf Build/bin Build/include Build/lib Build/share
rm -f Build/Stamp/install Build/Stamp/extract Build/Stamp/sha256sum Build/Stamp/build-ogg
Build/Stamp/init :
mkdir -p $(stamp_dir) $(tarball_dir)
touch $@
Build/Tarballs/$(flac_tarball) : Build/Stamp/init
(cd $(tarball_dir) && wget $(download_url)flac/$(flac_tarball) -O $(flac_tarball))
touch $@
Build/Tarballs/$(ogg_tarball) : Build/Stamp/init
(cd $(tarball_dir) && wget $(download_url)ogg/$(ogg_tarball) -O $(ogg_tarball))
touch $@
Build/Tarballs/$(vorbis_tarball) : Build/Stamp/init
(cd $(tarball_dir) && wget $(download_url)vorbis/$(vorbis_tarball) -O $(vorbis_tarball))
touch $@
Build/Tarballs/$(opus_tarball) : Build/Stamp/init
(cd $(tarball_dir) && wget https://archive.mozilla.org/pub/opus/$(opus_tarball) -O $(opus_tarball))
touch $@
Build/Stamp/tarballs : Build/Tarballs/$(flac_tarball) Build/Tarballs/$(ogg_tarball) Build/Tarballs/$(vorbis_tarball) Build/Tarballs/$(opus_tarball)
touch $@
Build/Stamp/sha256sum : Build/Stamp/tarballs
test `sha256sum $(tarball_dir)/$(ogg_tarball) | sed "s/ .*//"` = $(ogg_sha256sum)
test `sha256sum $(tarball_dir)/$(vorbis_tarball) | sed "s/ .*//"` = $(vorbis_sha256sum)
test `sha256sum $(tarball_dir)/$(flac_tarball) | sed "s/ .*//"` = $(flac_sha256sum)
test `sha256sum $(tarball_dir)/$(opus_tarball) | sed "s/ .*//"` = $(opus_sha256sum)
touch $@
Build/Stamp/extract : Build/Stamp/sha256sum
# (cd Build && tar xf Tarballs/$(ogg_tarball))
(cd Build && tar xf Tarballs/$(flac_tarball))
(cd Build && tar xf Tarballs/$(vorbis_tarball))
(cd Build && tar xf Tarballs/$(opus_tarball))
touch $@
Build/Stamp/build-ogg : Build/Stamp/sha256sum
ifeq ($(disable_ogg_crc), true)
echo "Ogg/CRC enabled"
(cd Build && git clone https://github.com/xiph/ogg $(ogg_version))
(cd Build/$(ogg_version) && autoreconf -vif && CFLAGS=-fPIC ./configure $(config_options) --disable-crc && make all install)
else
echo "Ogg/CRC disabled"
(cd Build && tar xf Tarballs/$(ogg_tarball))
(cd Build/$(ogg_version) && CFLAGS=-fPIC ./configure $(config_options) && make all install)
endif
touch $@
Build/Stamp/install-libs : Build/Stamp/extract Build/Stamp/build-ogg
(cd Build/$(vorbis_version) && CFLAGS=-fPIC ./configure $(config_options) && make all install)
(cd Build/$(flac_version) && CFLAGS=-fPIC ./configure $(config_options) && make all install)
(cd Build/$(opus_version) && CFLAGS=-fPIC ./configure $(config_options) && make all install)
touch $@
configure : configure.ac
autoreconf -vif
Build/Stamp/configure : Build/Stamp/install-libs configure
PKG_CONFIG_LIBDIR=Build/lib/pkgconfig ./configure
sed -i 's#^EXTERNAL_XIPH_CFLAGS.*#EXTERNAL_XIPH_CFLAGS = -I$(pwd)/Build/include#' Makefile
sed -i 's#^EXTERNAL_XIPH_LIBS.*#EXTERNAL_XIPH_LIBS = -static $(pwd)/Build/lib/libFLAC.la $(pwd)/Build/lib/libvorbis.la $(pwd)/Build/lib/libvorbisenc.la $(pwd)/Build/lib/libopus.la $(pwd)/Build/lib/libogg.la -dynamic #' Makefile
make clean
touch $@
Build/Stamp/build : Build/Stamp/configure
make all check
touch $@