speex-dsp-lutin/lutin_speex-dsp.py

90 lines
2.6 KiB
Python
Raw Normal View History

2015-06-15 22:50:29 +02:00
#!/usr/bin/python
import lutin.debug as debug
2015-06-15 22:50:29 +02:00
import lutin.tools as tools
2015-10-14 21:21:03 +02:00
import os
def get_type():
return "LIBRARY"
2015-06-15 22:50:29 +02:00
def get_desc():
return "Algorithm of speex codec"
2015-10-14 21:21:03 +02:00
def get_licence():
return "BSD-3"
def get_compagny_type():
return "org"
def get_compagny_name():
return "Xiph"
2015-06-15 22:50:29 +02:00
2015-10-14 21:21:03 +02:00
def get_version():
return [1,2,"rc3"]
def configure(target, my_module):
2015-06-15 22:50:29 +02:00
# add the file to compile:
2015-09-24 21:44:04 +02:00
my_module.add_src_file([
2015-06-15 22:50:29 +02:00
'speex-dsp/libspeexdsp/filterbank.c',
'speex-dsp/libspeexdsp/resample.c',
'speex-dsp/libspeexdsp/scal.c',
'speex-dsp/libspeexdsp/fftwrap.c',
'speex-dsp/libspeexdsp/jitter.c',
'speex-dsp/libspeexdsp/mdf.c',
'speex-dsp/libspeexdsp/preprocess.c',
'speex-dsp/libspeexdsp/smallft.c',
'speex-dsp/libspeexdsp/buffer.c',
'speex-dsp/libspeexdsp/kiss_fft.c',
'speex-dsp/libspeexdsp/kiss_fftr.c'
])
2015-09-24 21:44:04 +02:00
my_module.add_header_file([
2015-10-14 21:21:03 +02:00
'speex-dsp/include/speex/speexdsp_types.h',
'speex-dsp/include/speex/speexdsp_config_types.h',
'speex-dsp/include/speex/speex_buffer.h',
'speex-dsp/include/speex/speex_preprocess.h',
'speex-dsp/include/speex/speex_echo.h',
'speex-dsp/include/speex/speex_jitter.h',
'speex-dsp/include/speex/speex_resampler.h'
],
destination_path="speex")
2015-06-15 22:50:29 +02:00
# name of the dependency
2016-09-08 21:35:02 +02:00
my_module.add_depend(['z', 'm'])
2015-10-14 21:21:03 +02:00
my_module.compile_version("c", 1999)
my_module.add_path("speex-dsp/include")
2015-06-15 22:50:29 +02:00
# configure library:
# Make use of ARM4 assembly optimizations
2016-09-08 21:35:02 +02:00
#my_module.add_flag('c', "-DARM4_ASM=1")
2015-06-15 22:50:29 +02:00
# Make use of ARM5E assembly optimizations
2016-09-08 21:35:02 +02:00
#my_module.add_flag('c', "-DARM5E_ASM=1")
2015-06-15 22:50:29 +02:00
# Make use of Blackfin assembly optimizations
2016-09-08 21:35:02 +02:00
#my_module.add_flag('c', "-DBFIN_ASM=1")
2015-06-15 22:50:29 +02:00
# Disable all parts of the API that are using floats
2016-09-08 21:35:02 +02:00
#my_module.add_flag('c', "-DDISABLE_FLOAT_API=1")
2015-06-15 22:50:29 +02:00
# Enable valgrind extra checks
2016-09-08 21:35:02 +02:00
#my_module.add_flag('c', "-DENABLE_VALGRIND=1")
2015-06-15 22:50:29 +02:00
# Symbol visibility prefix */
#define EXPORT __attribute__((visibility("default")))
2016-09-08 21:35:02 +02:00
my_module.add_flag('c', "-DEXPORT=''")
2015-06-15 22:50:29 +02:00
# Debug fixed-point implementation */
2016-09-08 21:35:02 +02:00
#my_module.add_flag('c', "-DFIXED_DEBUG=1")
2015-06-15 22:50:29 +02:00
# Compile as fixed-point / floating-point
if True:
2016-09-08 21:35:02 +02:00
my_module.add_flag('c', "-DFIXED_POINT")
2015-06-15 22:50:29 +02:00
else:
2016-09-08 21:35:02 +02:00
my_module.add_flag('c', "-DFLOATING_POINT")
2015-06-15 22:50:29 +02:00
# Enable NEON support */
2016-09-08 21:35:02 +02:00
#my_module.add_flag('c', "-D_USE_NEON=1")
2015-06-15 22:50:29 +02:00
# Enable SSE support */
2016-09-08 21:35:02 +02:00
my_module.add_flag('c', "-D_USE_SSE=1")
2015-06-15 22:50:29 +02:00
# Enable SSE2 support */
2016-09-08 21:35:02 +02:00
my_module.add_flag('c', "-D_USE_SSE2=1")
2015-06-15 22:50:29 +02:00
# Define to 1 if you have the <alloca.h> header file.
2016-09-08 21:35:02 +02:00
my_module.add_flag('c', "-DHAVE_ALLOCA_H=1")
2015-06-15 22:50:29 +02:00
# Use FFT from OggVorbis */
2016-09-08 21:35:02 +02:00
my_module.add_flag('c', "-DUSE_SMALLFT=1")
2015-06-15 22:50:29 +02:00
# Use C99 variable-size arrays */
2016-09-08 21:35:02 +02:00
my_module.add_flag('c', "-DVAR_ARRAYS=1")
2015-06-15 22:50:29 +02:00
return True
2015-06-15 22:50:29 +02:00