Home | History | Annotate | Download | only in libopus
      1 # Provide the full test output for failed tests when using the parallel
      2 # test suite (which is enabled by default with automake 1.13+).
      3 export VERBOSE = yes
      4 
      5 AUTOMAKE_OPTIONS = subdir-objects
      6 ACLOCAL_AMFLAGS = -I m4
      7 
      8 lib_LTLIBRARIES = libopus.la
      9 
     10 DIST_SUBDIRS = doc
     11 
     12 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \
     13               -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
     14 
     15 include celt_sources.mk
     16 include silk_sources.mk
     17 include opus_sources.mk
     18 
     19 if FIXED_POINT
     20 SILK_SOURCES += $(SILK_SOURCES_FIXED)
     21 else
     22 SILK_SOURCES += $(SILK_SOURCES_FLOAT)
     23 endif
     24 
     25 if DISABLE_FLOAT_API
     26 else
     27 OPUS_SOURCES += $(OPUS_SOURCES_FLOAT)
     28 endif
     29 
     30 if CPU_ARM
     31 CELT_SOURCES += $(CELT_SOURCES_ARM)
     32 SILK_SOURCES += $(SILK_SOURCES_ARM)
     33 if OPUS_ARM_EXTERNAL_ASM
     34 nodist_libopus_la_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S)
     35 BUILT_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \
     36  $(CELT_AM_SOURCES_ARM_ASM:.s.in=.s) \
     37  $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S)
     38 endif
     39 endif
     40 
     41 CLEANFILES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \
     42  $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S)
     43 
     44 include celt_headers.mk
     45 include silk_headers.mk
     46 include opus_headers.mk
     47 
     48 libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
     49 libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@
     50 libopus_la_LIBADD = $(LIBM)
     51 
     52 pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h
     53 
     54 noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
     55 
     56 if EXTRA_PROGRAMS
     57 noinst_PROGRAMS = opus_demo repacketizer_demo opus_compare tests/test_opus_api tests/test_opus_encode tests/test_opus_decode tests/test_opus_padding 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
     58 
     59 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 tests/test_opus_padding
     60 
     61 opus_demo_SOURCES = src/opus_demo.c
     62 
     63 opus_demo_LDADD = libopus.la $(LIBM)
     64 
     65 repacketizer_demo_SOURCES = src/repacketizer_demo.c
     66 
     67 repacketizer_demo_LDADD = libopus.la $(LIBM)
     68 
     69 opus_compare_SOURCES = src/opus_compare.c
     70 opus_compare_LDADD = $(LIBM)
     71 
     72 tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
     73 tests_test_opus_api_LDADD = libopus.la $(LIBM)
     74 
     75 tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h
     76 tests_test_opus_encode_LDADD = libopus.la $(LIBM)
     77 
     78 tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
     79 tests_test_opus_decode_LDADD = libopus.la $(LIBM)
     80 
     81 tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h
     82 tests_test_opus_padding_LDADD = libopus.la $(LIBM)
     83 
     84 celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
     85 celt_tests_test_unit_cwrs32_LDADD = $(LIBM)
     86 
     87 celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
     88 celt_tests_test_unit_dft_LDADD = $(LIBM)
     89 
     90 celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
     91 celt_tests_test_unit_entropy_LDADD = $(LIBM)
     92 
     93 celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
     94 celt_tests_test_unit_laplace_LDADD = $(LIBM)
     95 
     96 celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
     97 celt_tests_test_unit_mathops_LDADD = $(LIBM)
     98 
     99 celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
    100 celt_tests_test_unit_mdct_LDADD = $(LIBM)
    101 
    102 celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
    103 celt_tests_test_unit_rotation_LDADD = $(LIBM)
    104 
    105 celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
    106 celt_tests_test_unit_types_LDADD = $(LIBM)
    107 endif
    108 
    109 if CUSTOM_MODES
    110 pkginclude_HEADERS += include/opus_custom.h
    111 if EXTRA_PROGRAMS
    112 noinst_PROGRAMS += opus_custom_demo
    113 opus_custom_demo_SOURCES = celt/opus_custom_demo.c
    114 opus_custom_demo_LDADD = libopus.la $(LIBM)
    115 endif
    116 endif
    117 
    118 EXTRA_DIST = version.mk \
    119              opus.pc.in \
    120              opus-uninstalled.pc.in \
    121              opus.m4 \
    122              Makefile.unix \
    123              tests/run_vectors.sh \
    124              celt/arm/arm2gnu.pl \
    125              celt/arm/celt_pitch_xcorr_arm.s \
    126              win32/VS2010/silk_float.vcxproj \
    127              win32/VS2010/celt.vcxproj.filters \
    128              win32/VS2010/opus.vcxproj \
    129              win32/VS2010/silk_common.vcxproj.filters \
    130              win32/VS2010/silk_float.vcxproj.filters \
    131              win32/VS2010/test_opus_encode.vcxproj.filters \
    132              win32/VS2010/silk_common.vcxproj \
    133              win32/VS2010/test_opus_encode.vcxproj \
    134              win32/VS2010/opus_demo.vcxproj \
    135              win32/VS2010/test_opus_api.vcxproj.filters \
    136              win32/VS2010/test_opus_api.vcxproj \
    137              win32/VS2010/test_opus_decode.vcxproj.filters \
    138              win32/VS2010/silk_fixed.vcxproj.filters \
    139              win32/VS2010/opus_demo.vcxproj.filters \
    140              win32/VS2010/silk_fixed.vcxproj \
    141              win32/VS2010/opus.vcxproj.filters \
    142              win32/VS2010/test_opus_decode.vcxproj \
    143              win32/VS2010/celt.vcxproj \
    144              win32/VS2010/opus.sln \
    145              win32/genversion.bat \
    146              win32/config.h
    147 
    148 pkgconfigdir = $(libdir)/pkgconfig
    149 pkgconfig_DATA = opus.pc
    150 
    151 m4datadir = $(datadir)/aclocal
    152 m4data_DATA = opus.m4
    153 
    154 # Targets to build and install just the library without the docs
    155 opus check-opus install-opus: export NO_DOXYGEN = 1
    156 
    157 opus: all
    158 check-opus: check
    159 install-opus: install
    160 
    161 
    162 # Or just the docs
    163 docs:
    164 	( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
    165 
    166 install-docs:
    167 	( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
    168 
    169 
    170 # Or everything (by default)
    171 all-local:
    172 	@[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
    173 
    174 install-data-local:
    175 	@[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
    176 
    177 clean-local:
    178 	-( cd doc && $(MAKE) $(AM_MAKEFLAGS) clean )
    179 
    180 uninstall-local:
    181 	( cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall )
    182 
    183 
    184 # We check this every time make is run, with configure.ac being touched to
    185 # trigger an update of the build system files if update_version changes the
    186 # current PACKAGE_VERSION (or if package_version was modified manually by a
    187 # user with either AUTO_UPDATE=no or no update_version script present - the
    188 # latter being the normal case for tarball releases).
    189 #
    190 # We can't just add the package_version file to CONFIGURE_DEPENDENCIES since
    191 # simply running autoconf will not actually regenerate configure for us when
    192 # the content of that file changes (due to autoconf dependency checking not
    193 # knowing about that without us creating yet another file for it to include).
    194 #
    195 # The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for
    196 # makes that don't support it.  The only loss of functionality is not forcing
    197 # an update of package_version for `make dist` if AUTO_UPDATE=no, but that is
    198 # unlikely to be a real problem for any real user.
    199 $(top_srcdir)/configure.ac: force
    200 	@case "$(MAKECMDGOALS)" in \
    201 	    dist-hook)                             exit 0       ;; \
    202 	    dist-* | dist | distcheck | distclean) _arg=release ;; \
    203 	esac; \
    204 	if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \
    205 	    if [ ! -e $(top_srcdir)/package_version ]; then \
    206 		echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \
    207 	    fi; \
    208 	    . $(top_srcdir)/package_version || exit 1; \
    209 	    [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \
    210 	fi; \
    211 	touch $@
    212 
    213 force:
    214 
    215 # Create a minimal package_version file when make dist is run.
    216 dist-hook:
    217 	echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version
    218 
    219 
    220 .PHONY: opus check-opus install-opus docs install-docs
    221 
    222 # automake doesn't do dependency tracking for asm files, that I can tell
    223 $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): celt/arm/armopts-gnu.S
    224 $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): $(top_srcdir)/celt/arm/arm2gnu.pl
    225 
    226 # convert ARM asm to GNU as format
    227 %-gnu.S: $(top_srcdir)/%.s
    228 	$(top_srcdir)/celt/arm/arm2gnu.pl < $< > $@
    229 # For autoconf-modified sources (e.g., armopts.s)
    230 %-gnu.S: %.s
    231 	$(top_srcdir)/celt/arm/arm2gnu.pl < $< > $@
    232