Makefile.am 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  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 $(NE10_CFLAGS)
  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. if HAVE_SSE4_1
  16. SILK_SOURCES += $(SILK_SOURCES_SSE4_1) $(SILK_SOURCES_FIXED_SSE4_1)
  17. endif
  18. if HAVE_ARM_NEON_INTR
  19. SILK_SOURCES += $(SILK_SOURCES_FIXED_ARM_NEON_INTR)
  20. endif
  21. else
  22. SILK_SOURCES += $(SILK_SOURCES_FLOAT)
  23. if HAVE_SSE4_1
  24. SILK_SOURCES += $(SILK_SOURCES_SSE4_1)
  25. endif
  26. endif
  27. if DISABLE_FLOAT_API
  28. else
  29. OPUS_SOURCES += $(OPUS_SOURCES_FLOAT)
  30. endif
  31. if HAVE_SSE
  32. CELT_SOURCES += $(CELT_SOURCES_SSE)
  33. endif
  34. if HAVE_SSE2
  35. CELT_SOURCES += $(CELT_SOURCES_SSE2)
  36. endif
  37. if HAVE_SSE4_1
  38. CELT_SOURCES += $(CELT_SOURCES_SSE4_1)
  39. endif
  40. if CPU_ARM
  41. CELT_SOURCES += $(CELT_SOURCES_ARM)
  42. SILK_SOURCES += $(SILK_SOURCES_ARM)
  43. if HAVE_ARM_NEON_INTR
  44. CELT_SOURCES += $(CELT_SOURCES_ARM_NEON_INTR)
  45. SILK_SOURCES += $(SILK_SOURCES_ARM_NEON_INTR)
  46. endif
  47. if HAVE_ARM_NE10
  48. CELT_SOURCES += $(CELT_SOURCES_ARM_NE10)
  49. endif
  50. if OPUS_ARM_EXTERNAL_ASM
  51. noinst_LTLIBRARIES = libarmasm.la
  52. libarmasm_la_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S)
  53. BUILT_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \
  54. $(CELT_AM_SOURCES_ARM_ASM:.s.in=.s) \
  55. $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S)
  56. endif
  57. endif
  58. CLEANFILES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \
  59. $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S)
  60. include celt_headers.mk
  61. include silk_headers.mk
  62. include opus_headers.mk
  63. libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
  64. libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@
  65. libopus_la_LIBADD = $(NE10_LIBS) $(LIBM)
  66. if OPUS_ARM_EXTERNAL_ASM
  67. libopus_la_LIBADD += libarmasm.la
  68. endif
  69. pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h include/opus_projection.h
  70. noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
  71. if EXTRA_PROGRAMS
  72. noinst_PROGRAMS = celt/tests/test_unit_cwrs32 \
  73. celt/tests/test_unit_dft \
  74. celt/tests/test_unit_entropy \
  75. celt/tests/test_unit_laplace \
  76. celt/tests/test_unit_mathops \
  77. celt/tests/test_unit_mdct \
  78. celt/tests/test_unit_rotation \
  79. celt/tests/test_unit_types \
  80. opus_compare \
  81. opus_demo \
  82. repacketizer_demo \
  83. silk/tests/test_unit_LPC_inv_pred_gain \
  84. tests/test_opus_api \
  85. tests/test_opus_decode \
  86. tests/test_opus_encode \
  87. tests/test_opus_padding \
  88. tests/test_opus_projection \
  89. trivial_example
  90. TESTS = celt/tests/test_unit_cwrs32 \
  91. celt/tests/test_unit_dft \
  92. celt/tests/test_unit_entropy \
  93. celt/tests/test_unit_laplace \
  94. celt/tests/test_unit_mathops \
  95. celt/tests/test_unit_mdct \
  96. celt/tests/test_unit_rotation \
  97. celt/tests/test_unit_types \
  98. silk/tests/test_unit_LPC_inv_pred_gain \
  99. tests/test_opus_api \
  100. tests/test_opus_decode \
  101. tests/test_opus_encode \
  102. tests/test_opus_padding \
  103. tests/test_opus_projection
  104. opus_demo_SOURCES = src/opus_demo.c
  105. opus_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
  106. repacketizer_demo_SOURCES = src/repacketizer_demo.c
  107. repacketizer_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
  108. opus_compare_SOURCES = src/opus_compare.c
  109. opus_compare_LDADD = $(LIBM)
  110. trivial_example_SOURCES = doc/trivial_example.c
  111. trivial_example_LDADD = libopus.la $(LIBM)
  112. tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
  113. tests_test_opus_api_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
  114. tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/opus_encode_regressions.c tests/test_opus_common.h
  115. tests_test_opus_encode_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
  116. tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
  117. tests_test_opus_decode_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
  118. tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h
  119. tests_test_opus_padding_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
  120. CELT_OBJ = $(CELT_SOURCES:.c=.lo)
  121. SILK_OBJ = $(SILK_SOURCES:.c=.lo)
  122. OPUS_OBJ = $(OPUS_SOURCES:.c=.lo)
  123. tests_test_opus_projection_SOURCES = tests/test_opus_projection.c tests/test_opus_common.h
  124. tests_test_opus_projection_LDADD = $(OPUS_OBJ) $(SILK_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
  125. if OPUS_ARM_EXTERNAL_ASM
  126. tests_test_opus_projection_LDADD += libarmasm.la
  127. endif
  128. silk_tests_test_unit_LPC_inv_pred_gain_SOURCES = silk/tests/test_unit_LPC_inv_pred_gain.c
  129. silk_tests_test_unit_LPC_inv_pred_gain_LDADD = $(SILK_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
  130. if OPUS_ARM_EXTERNAL_ASM
  131. silk_tests_test_unit_LPC_inv_pred_gain_LDADD += libarmasm.la
  132. endif
  133. celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
  134. celt_tests_test_unit_cwrs32_LDADD = $(LIBM)
  135. celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
  136. celt_tests_test_unit_dft_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
  137. if OPUS_ARM_EXTERNAL_ASM
  138. celt_tests_test_unit_dft_LDADD += libarmasm.la
  139. endif
  140. celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
  141. celt_tests_test_unit_entropy_LDADD = $(LIBM)
  142. celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
  143. celt_tests_test_unit_laplace_LDADD = $(LIBM)
  144. celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
  145. celt_tests_test_unit_mathops_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
  146. if OPUS_ARM_EXTERNAL_ASM
  147. celt_tests_test_unit_mathops_LDADD += libarmasm.la
  148. endif
  149. celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
  150. celt_tests_test_unit_mdct_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
  151. if OPUS_ARM_EXTERNAL_ASM
  152. celt_tests_test_unit_mdct_LDADD += libarmasm.la
  153. endif
  154. celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
  155. celt_tests_test_unit_rotation_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
  156. if OPUS_ARM_EXTERNAL_ASM
  157. celt_tests_test_unit_rotation_LDADD += libarmasm.la
  158. endif
  159. celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
  160. celt_tests_test_unit_types_LDADD = $(LIBM)
  161. endif
  162. if CUSTOM_MODES
  163. pkginclude_HEADERS += include/opus_custom.h
  164. if EXTRA_PROGRAMS
  165. noinst_PROGRAMS += opus_custom_demo
  166. opus_custom_demo_SOURCES = celt/opus_custom_demo.c
  167. opus_custom_demo_LDADD = libopus.la $(LIBM)
  168. endif
  169. endif
  170. EXTRA_DIST = opus.pc.in \
  171. opus-uninstalled.pc.in \
  172. opus.m4 \
  173. Makefile.mips \
  174. Makefile.unix \
  175. CMakeLists.txt \
  176. cmake/CFeatureCheck.cmake \
  177. cmake/OpusBuildtype.cmake \
  178. cmake/OpusConfig.cmake \
  179. cmake/OpusConfig.cmake.in \
  180. cmake/OpusFunctions.cmake \
  181. cmake/OpusPackageVersion.cmake \
  182. cmake/OpusSources.cmake \
  183. cmake/RunTest.cmake \
  184. cmake/config.h.cmake.in \
  185. cmake/vla.c \
  186. meson/get-version.py \
  187. meson/read-sources-list.py \
  188. meson.build \
  189. meson_options.txt \
  190. include/meson.build \
  191. celt/meson.build \
  192. celt/tests/meson.build \
  193. silk/meson.build \
  194. silk/tests/meson.build \
  195. src/meson.build \
  196. tests/meson.build \
  197. doc/meson.build \
  198. tests/run_vectors.sh \
  199. celt/arm/arm2gnu.pl \
  200. celt/arm/celt_pitch_xcorr_arm.s \
  201. win32/VS2015/opus.vcxproj \
  202. win32/VS2015/test_opus_encode.vcxproj.filters \
  203. win32/VS2015/test_opus_encode.vcxproj \
  204. win32/VS2015/opus_demo.vcxproj \
  205. win32/VS2015/test_opus_api.vcxproj.filters \
  206. win32/VS2015/test_opus_api.vcxproj \
  207. win32/VS2015/test_opus_decode.vcxproj.filters \
  208. win32/VS2015/opus_demo.vcxproj.filters \
  209. win32/VS2015/opus.vcxproj.filters \
  210. win32/VS2015/test_opus_decode.vcxproj \
  211. win32/VS2015/opus.sln \
  212. win32/VS2015/common.props \
  213. win32/genversion.bat \
  214. win32/config.h
  215. pkgconfigdir = $(libdir)/pkgconfig
  216. pkgconfig_DATA = opus.pc
  217. m4datadir = $(datadir)/aclocal
  218. m4data_DATA = opus.m4
  219. # Targets to build and install just the library without the docs
  220. opus check-opus install-opus: export NO_DOXYGEN = 1
  221. opus: all
  222. check-opus: check
  223. install-opus: install
  224. # Or just the docs
  225. docs:
  226. ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
  227. install-docs:
  228. ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
  229. # Or everything (by default)
  230. all-local:
  231. @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
  232. install-data-local:
  233. @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
  234. clean-local:
  235. -( cd doc && $(MAKE) $(AM_MAKEFLAGS) clean )
  236. uninstall-local:
  237. ( cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall )
  238. # We check this every time make is run, with configure.ac being touched to
  239. # trigger an update of the build system files if update_version changes the
  240. # current PACKAGE_VERSION (or if package_version was modified manually by a
  241. # user with either AUTO_UPDATE=no or no update_version script present - the
  242. # latter being the normal case for tarball releases).
  243. #
  244. # We can't just add the package_version file to CONFIGURE_DEPENDENCIES since
  245. # simply running autoconf will not actually regenerate configure for us when
  246. # the content of that file changes (due to autoconf dependency checking not
  247. # knowing about that without us creating yet another file for it to include).
  248. #
  249. # The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for
  250. # makes that don't support it. The only loss of functionality is not forcing
  251. # an update of package_version for `make dist` if AUTO_UPDATE=no, but that is
  252. # unlikely to be a real problem for any real user.
  253. $(top_srcdir)/configure.ac: force
  254. @case "$(MAKECMDGOALS)" in \
  255. dist-hook) exit 0 ;; \
  256. dist-* | dist | distcheck | distclean) _arg=release ;; \
  257. esac; \
  258. if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \
  259. if [ ! -e $(top_srcdir)/package_version ]; then \
  260. echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \
  261. fi; \
  262. . $(top_srcdir)/package_version || exit 1; \
  263. [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \
  264. fi; \
  265. touch $@
  266. force:
  267. # Create a minimal package_version file when make dist is run.
  268. dist-hook:
  269. echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version
  270. .PHONY: opus check-opus install-opus docs install-docs
  271. # automake doesn't do dependency tracking for asm files, that I can tell
  272. $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): celt/arm/armopts-gnu.S
  273. $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): $(top_srcdir)/celt/arm/arm2gnu.pl
  274. # convert ARM asm to GNU as format
  275. %-gnu.S: $(top_srcdir)/%.s
  276. $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@
  277. # For autoconf-modified sources (e.g., armopts.s)
  278. %-gnu.S: %.s
  279. $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@
  280. OPT_UNIT_TEST_OBJ = $(celt_tests_test_unit_mathops_SOURCES:.c=.o) \
  281. $(celt_tests_test_unit_rotation_SOURCES:.c=.o) \
  282. $(celt_tests_test_unit_mdct_SOURCES:.c=.o) \
  283. $(celt_tests_test_unit_dft_SOURCES:.c=.o) \
  284. $(silk_tests_test_unit_LPC_inv_pred_gain_SOURCES:.c=.o)
  285. if HAVE_SSE
  286. SSE_OBJ = $(CELT_SOURCES_SSE:.c=.lo)
  287. $(SSE_OBJ): CFLAGS += $(OPUS_X86_SSE_CFLAGS)
  288. endif
  289. if HAVE_SSE2
  290. SSE2_OBJ = $(CELT_SOURCES_SSE2:.c=.lo)
  291. $(SSE2_OBJ): CFLAGS += $(OPUS_X86_SSE2_CFLAGS)
  292. endif
  293. if HAVE_SSE4_1
  294. SSE4_1_OBJ = $(CELT_SOURCES_SSE4_1:.c=.lo) \
  295. $(SILK_SOURCES_SSE4_1:.c=.lo) \
  296. $(SILK_SOURCES_FIXED_SSE4_1:.c=.lo)
  297. $(SSE4_1_OBJ): CFLAGS += $(OPUS_X86_SSE4_1_CFLAGS)
  298. endif
  299. if HAVE_ARM_NEON_INTR
  300. ARM_NEON_INTR_OBJ = $(CELT_SOURCES_ARM_NEON_INTR:.c=.lo) \
  301. $(SILK_SOURCES_ARM_NEON_INTR:.c=.lo) \
  302. $(SILK_SOURCES_FIXED_ARM_NEON_INTR:.c=.lo)
  303. $(ARM_NEON_INTR_OBJ): CFLAGS += \
  304. $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS)
  305. endif