Makefile.am 8.1 KB

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