test_opus_api: Fix valgrind expectations broken by last commit.
[opus.git] / Makefile.am
index bfdc5f4..3607e52 100644 (file)
+AUTOMAKE_OPTIONS = subdir-objects
+
 lib_LTLIBRARIES = libopus.la
 
-INCLUDES = -I$(top_srcdir)/libcelt -I$(top_srcdir)/silk
-
-libopus_la_SOURCES = libcelt/bands.c \
-libcelt/celt.c \
-libcelt/cwrs.c \
-libcelt/entcode.c \
-libcelt/entdec.c \
-libcelt/entenc.c \
-libcelt/kiss_fft.c \
-libcelt/laplace.c \
-libcelt/mathops.c \
-libcelt/mdct.c \
-libcelt/modes.c \
-libcelt/pitch.c \
-libcelt/plc.c \
-libcelt/quant_bands.c \
-libcelt/rate.c \
-libcelt/vq.c
-
-libopus_la_SOURCES += src/opus_decoder.c \
-src/opus_encoder.c
-libopus_la_SOURCES += \
-silk/SKP_Silk_CNG.c \
-silk/SKP_Silk_code_signs.c \
-silk/SKP_Silk_create_init_destroy.c \
-silk/SKP_Silk_decode_core.c \
-silk/SKP_Silk_decode_frame.c \
-silk/SKP_Silk_decode_parameters.c \
-silk/SKP_Silk_decode_indices.c \
-silk/SKP_Silk_decode_pulses.c \
-silk/SKP_Silk_decoder_set_fs.c \
-silk/SKP_Silk_dec_API.c \
-silk/SKP_Silk_enc_API.c \
-silk/SKP_Silk_encode_indices.c \
-silk/SKP_Silk_encode_pulses.c \
-silk/SKP_Silk_gain_quant.c \
-silk/SKP_Silk_interpolate.c \
-silk/SKP_Silk_LP_variable_cutoff.c \
-silk/SKP_Silk_NLSF2A_stable.c \
-silk/SKP_Silk_NLSF_decode.c \
-silk/SKP_Silk_NSQ.c \
-silk/SKP_Silk_NSQ_del_dec.c \
-silk/SKP_Silk_PLC.c \
-silk/SKP_Silk_shell_coder.c \
-silk/SKP_Silk_tables_gain.c \
-silk/SKP_Silk_tables_LTP.c \
-silk/SKP_Silk_tables_NLSF_CB_NB_MB.c \
-silk/SKP_Silk_tables_NLSF_CB_WB.c \
-silk/SKP_Silk_tables_other.c \
-silk/SKP_Silk_tables_pitch_lag.c \
-silk/SKP_Silk_tables_pulses_per_block.c \
-silk/SKP_Silk_VAD.c \
-silk/SKP_Silk_control_audio_bandwidth.c \
-silk/SKP_Silk_quant_LTP_gains.c \
-silk/SKP_Silk_VQ_WMat_EC.c \
-silk/SKP_Silk_HP_variable_cutoff.c \
-silk/SKP_Silk_NLSF_encode.c \
-silk/SKP_Silk_NLSF_VQ.c \
-silk/SKP_Silk_NLSF_unpack.c \
-silk/SKP_Silk_NLSF_del_dec_quant.c \
-silk/SKP_Silk_process_NLSFs.c \
-silk/SKP_Silk_stereo_LR_to_MS.c \
-silk/SKP_Silk_stereo_MS_to_LR.c \
-silk/SKP_Silk_check_control_input.c \
-silk/SKP_Silk_control_SNR.c \
-silk/SKP_Silk_init_encoder.c \
-silk/SKP_Silk_control_codec.c \
-silk/SKP_Silk_A2NLSF.c \
-silk/SKP_Silk_ana_filt_bank_1.c \
-silk/SKP_Silk_apply_sine_window.c \
-silk/SKP_Silk_array_maxabs.c \
-silk/SKP_Silk_autocorr.c \
-silk/SKP_Silk_biquad_alt.c \
-silk/SKP_Silk_burg_modified.c \
-silk/SKP_Silk_bwexpander_32.c \
-silk/SKP_Silk_bwexpander.c \
-silk/SKP_Silk_debug.c \
-silk/SKP_Silk_decode_pitch.c \
-silk/SKP_Silk_inner_prod_aligned.c \
-silk/SKP_Silk_k2a.c \
-silk/SKP_Silk_k2a_Q16.c \
-silk/SKP_Silk_lin2log.c \
-silk/SKP_Silk_log2lin.c \
-silk/SKP_Silk_LPC_analysis_filter.c \
-silk/SKP_Silk_LPC_inv_pred_gain.c \
-silk/SKP_Silk_LPC_stabilize.c \
-silk/SKP_Silk_LPC_synthesis_filter.c \
-silk/SKP_Silk_LPC_synthesis_order16.c \
-silk/SKP_Silk_LSF_cos_table.c \
-silk/SKP_Silk_NLSF2A.c \
-silk/SKP_Silk_NLSF_stabilize.c \
-silk/SKP_Silk_NLSF_VQ_weights_laroia.c \
-silk/SKP_Silk_pitch_analysis_core.c \
-silk/SKP_Silk_pitch_est_tables.c \
-silk/SKP_Silk_resampler.c \
-silk/SKP_Silk_resampler_down2_3.c \
-silk/SKP_Silk_resampler_down2.c \
-silk/SKP_Silk_resampler_down3.c \
-silk/SKP_Silk_resampler_private_AR2.c \
-silk/SKP_Silk_resampler_private_ARMA4.c \
-silk/SKP_Silk_resampler_private_copy.c \
-silk/SKP_Silk_resampler_private_down4.c \
-silk/SKP_Silk_resampler_private_down_FIR.c \
-silk/SKP_Silk_resampler_private_IIR_FIR.c \
-silk/SKP_Silk_resampler_private_up2_HQ.c \
-silk/SKP_Silk_resampler_private_up4.c \
-silk/SKP_Silk_resampler_rom.c \
-silk/SKP_Silk_resampler_up2.c \
-silk/SKP_Silk_scale_copy_vector16.c \
-silk/SKP_Silk_scale_vector.c \
-silk/SKP_Silk_schur64.c \
-silk/SKP_Silk_schur.c \
-silk/SKP_Silk_sigm_Q15.c \
-silk/SKP_Silk_sort.c \
-silk/SKP_Silk_sum_sqr_shift.c \
-silk/SKP_Silk_autocorrelation_FLP.c \
-silk/SKP_Silk_burg_modified_FLP.c \
-silk/SKP_Silk_bwexpander_FLP.c \
-silk/SKP_Silk_energy_FLP.c \
-silk/SKP_Silk_inner_product_FLP.c \
-silk/SKP_Silk_k2a_FLP.c \
-silk/SKP_Silk_levinsondurbin_FLP.c \
-silk/SKP_Silk_LPC_inv_pred_gain_FLP.c \
-silk/SKP_Silk_pitch_analysis_core_FLP.c \
-silk/SKP_Silk_scale_copy_vector_FLP.c \
-silk/SKP_Silk_scale_vector_FLP.c \
-silk/SKP_Silk_schur_FLP.c \
-silk/SKP_Silk_sort_FLP.c
+DIST_SUBDIRS = doc
+
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
+
+include celt_sources.mk
+include silk_sources.mk
+include opus_sources.mk
 
 if FIXED_POINT
-libopus_la_SOURCES += \
-silk/fixed/SKP_Silk_LTP_analysis_filter_FIX.c \
-silk/fixed/SKP_Silk_LTP_scale_ctrl_FIX.c \
-silk/fixed/SKP_Silk_corrMatrix_FIX.c \
-silk/fixed/SKP_Silk_encode_frame_FIX.c \
-silk/fixed/SKP_Silk_find_LPC_FIX.c \
-silk/fixed/SKP_Silk_find_LTP_FIX.c \
-silk/fixed/SKP_Silk_find_pitch_lags_FIX.c \
-silk/fixed/SKP_Silk_find_pred_coefs_FIX.c \
-silk/fixed/SKP_Silk_noise_shape_analysis_FIX.c \
-silk/fixed/SKP_Silk_prefilter_FIX.c \
-silk/fixed/SKP_Silk_process_gains_FIX.c \
-silk/fixed/SKP_Silk_regularize_correlations_FIX.c \
-silk/fixed/SKP_Silk_residual_energy16_FIX.c \
-silk/fixed/SKP_Silk_residual_energy_FIX.c \
-silk/fixed/SKP_Silk_solve_LS_FIX.c \
-silk/fixed/SKP_Silk_warped_autocorrelation_FIX.c
+SILK_SOURCES += $(SILK_SOURCES_FIXED)
 else
-libopus_la_SOURCES += \
-silk/float/SKP_Silk_apply_sine_window_FLP.c \
-silk/float/SKP_Silk_corrMatrix_FLP.c \
-silk/float/SKP_Silk_encode_frame_FLP.c \
-silk/float/SKP_Silk_find_LPC_FLP.c \
-silk/float/SKP_Silk_find_LTP_FLP.c \
-silk/float/SKP_Silk_find_pitch_lags_FLP.c \
-silk/float/SKP_Silk_find_pred_coefs_FLP.c \
-silk/float/SKP_Silk_LPC_analysis_filter_FLP.c \
-silk/float/SKP_Silk_LTP_analysis_filter_FLP.c \
-silk/float/SKP_Silk_LTP_scale_ctrl_FLP.c \
-silk/float/SKP_Silk_noise_shape_analysis_FLP.c \
-silk/float/SKP_Silk_prefilter_FLP.c \
-silk/float/SKP_Silk_process_gains_FLP.c \
-silk/float/SKP_Silk_regularize_correlations_FLP.c \
-silk/float/SKP_Silk_residual_energy_FLP.c \
-silk/float/SKP_Silk_solve_LS_FLP.c \
-silk/float/SKP_Silk_warped_autocorrelation_FLP.c \
-silk/float/SKP_Silk_wrappers_FLP.c
+SILK_SOURCES += $(SILK_SOURCES_FLOAT)
+endif
+
+include celt_headers.mk
+include silk_headers.mk
+include opus_headers.mk
+
+libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
+
+pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h
+
+noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
+
+noinst_PROGRAMS = opus_demo repacketizer_demo opus_compare tests/test_opus_api tests/test_opus_encode tests/test_opus_decode celt/tests/test_unit_cwrs32 celt/tests/test_unit_dft celt/tests/test_unit_entropy celt/tests/test_unit_laplace celt/tests/test_unit_mathops celt/tests/test_unit_mdct celt/tests/test_unit_rotation celt/tests/test_unit_types
+
+TESTS = celt/tests/test_unit_types celt/tests/test_unit_mathops celt/tests/test_unit_entropy celt/tests/test_unit_laplace celt/tests/test_unit_dft celt/tests/test_unit_mdct celt/tests/test_unit_rotation celt/tests/test_unit_cwrs32 tests/test_opus_api tests/test_opus_decode tests/test_opus_encode
+
+opus_demo_SOURCES = src/opus_demo.c
+
+opus_demo_LDADD = libopus.la -lm
+
+repacketizer_demo_SOURCES = src/repacketizer_demo.c
+
+repacketizer_demo_LDADD = libopus.la -lm
+
+opus_compare_SOURCES = src/opus_compare.c
+opus_compare_LDADD = -lm
+
+tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
+tests_test_opus_api_LDADD = libopus.la -lm
+
+tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h
+tests_test_opus_encode_LDADD = libopus.la -lm
+
+tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
+tests_test_opus_decode_LDADD = libopus.la -lm
+
+celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
+celt_tests_test_unit_cwrs32_LDADD = -lm
+
+celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
+celt_tests_test_unit_dft_LDADD = -lm
+
+celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
+celt_tests_test_unit_entropy_LDADD = -lm
+
+celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
+celt_tests_test_unit_laplace_LDADD = -lm
+
+celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
+celt_tests_test_unit_mathops_LDADD = -lm
+
+celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
+celt_tests_test_unit_mdct_LDADD = -lm
+
+celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
+celt_tests_test_unit_rotation_LDADD = -lm
+
+celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
+celt_tests_test_unit_types_LDADD = -lm
+
+if CUSTOM_MODES
+pkginclude_HEADERS += include/opus_custom.h
+noinst_PROGRAMS += opus_custom_demo
+opus_custom_demo_SOURCES = celt/opus_custom_demo.c
+opus_custom_demo_LDADD = libopus.la -lm
 endif
 
-pkginclude_HEADERS = src/opus.h
+EXTRA_DIST = opus.pc.in opus-uninstalled.pc.in
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = opus.pc
+
+
+# Targets to build and install just the library without the docs
+opus check-opus install-opus: export NO_DOXYGEN = 1
+
+opus: all
+check-opus: check
+install-opus: install
+
+
+# Or just the docs
+docs:
+       $(MAKE) $(AM_MAKEFLAGS) -C doc
+
+install-docs:
+       $(MAKE) $(AM_MAKEFLAGS) -C doc install
+
+
+# Or everything (by default)
+all-local:
+       @[ -n "$(NO_DOXYGEN)" ] || $(MAKE) $(AM_MAKEFLAGS) -C doc
+
+install-data-local:
+       @[ -n "$(NO_DOXYGEN)" ] || $(MAKE) $(AM_MAKEFLAGS) -C doc install
+
+clean-local:
+       -$(MAKE) $(AM_MAKEFLAGS) -C doc clean
 
-noinst_PROGRAMS = test_opus
+uninstall-local:
+       $(MAKE) $(AM_MAKEFLAGS) -C doc uninstall
 
-test_opus_SOURCES = src/test_opus.c
 
-test_opus_LDADD = libopus.la -lm
+.PHONY: opus check-opus install-opus docs install-docs