blob: 9c09decdf1d686929806f0ef1cbb3b5384c23dca [file] [log] [blame]
Ron90a39032013-06-29 16:36:24 +09301# Provide the full test output for failed tests when using the parallel
2# test suite (which is enabled by default with automake 1.13+).
3export VERBOSE = yes
4
Gregory Maxwell135e5d32012-04-29 20:24:36 -04005AUTOMAKE_OPTIONS = subdir-objects
Ron50b395b2013-05-20 12:31:48 +09306ACLOCAL_AMFLAGS = -I m4
Ralph Giles2852cb12011-08-02 11:43:43 -07007
Jean-Marc Valine05aaf22011-04-29 19:48:42 -04008lib_LTLIBRARIES = libopus.la
Jean-Marc Valina0cbeca2010-07-08 11:27:20 -04009
Ron9a89d562012-06-12 04:40:42 +093010DIST_SUBDIRS = doc
11
Ron64b39852013-06-29 15:40:27 +093012AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -050013 -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed $(NE10_CFLAGS)
Jean-Marc Valina0cbeca2010-07-08 11:27:20 -040014
Jean-Marc Valin8e4f5a82011-04-30 00:35:55 -040015include celt_sources.mk
16include silk_sources.mk
17include opus_sources.mk
Jean-Marc Valine7a2a032011-02-14 21:18:08 -050018
Jean-Marc Valinb2c00d22011-08-02 08:13:42 -040019if FIXED_POINT
20SILK_SOURCES += $(SILK_SOURCES_FIXED)
xiangmingzhuc95c9a02014-04-30 15:48:07 +080021if HAVE_SSE4_1
22SILK_SOURCES += $(SILK_SOURCES_SSE4_1) $(SILK_SOURCES_FIXED_SSE4_1)
23endif
Linfeng Zhang8e195362016-07-13 16:40:48 -070024if HAVE_ARM_NEON_INTR
25SILK_SOURCES += $(SILK_SOURCES_FIXED_ARM_NEON_INTR)
26endif
Jean-Marc Valinb2c00d22011-08-02 08:13:42 -040027else
28SILK_SOURCES += $(SILK_SOURCES_FLOAT)
Jonathan Lennox43120f02015-08-03 17:04:27 -040029if HAVE_SSE4_1
30SILK_SOURCES += $(SILK_SOURCES_SSE4_1)
31endif
Jean-Marc Valinb2c00d22011-08-02 08:13:42 -040032endif
33
Jean-Marc Valind814c5d2013-11-04 12:26:50 -050034if DISABLE_FLOAT_API
35else
Jean-Marc Valin3ab03e02013-09-06 16:00:39 -040036OPUS_SOURCES += $(OPUS_SOURCES_FLOAT)
Jean-Marc Valind814c5d2013-11-04 12:26:50 -050037endif
Jean-Marc Valin3ab03e02013-09-06 16:00:39 -040038
Jonathan Lennoxcb0875e2015-08-03 17:04:26 -040039if HAVE_SSE
xiangmingzhuc95c9a02014-04-30 15:48:07 +080040CELT_SOURCES += $(CELT_SOURCES_SSE)
41endif
Jonathan Lennoxcb0875e2015-08-03 17:04:26 -040042if HAVE_SSE2
43CELT_SOURCES += $(CELT_SOURCES_SSE2)
44endif
45if HAVE_SSE4_1
46CELT_SOURCES += $(CELT_SOURCES_SSE4_1)
xiangmingzhuc95c9a02014-04-30 15:48:07 +080047endif
48
Aurélien Zanellicd4c8242013-05-31 15:07:00 +020049if CPU_ARM
50CELT_SOURCES += $(CELT_SOURCES_ARM)
Timothy B. Terriberry39386e02013-11-18 13:30:13 -050051SILK_SOURCES += $(SILK_SOURCES_ARM)
Viswanath Puttagunta0b0a2b42014-12-19 17:25:55 -060052
Jonathan Lennox8cb14872015-11-20 23:02:55 -050053if HAVE_ARM_NEON_INTR
Viswanath Puttagunta0b0a2b42014-12-19 17:25:55 -060054CELT_SOURCES += $(CELT_SOURCES_ARM_NEON_INTR)
Jonathan Lennox44e8e732015-12-22 19:21:44 -050055SILK_SOURCES += $(SILK_SOURCES_ARM_NEON_INTR)
Viswanath Puttagunta0b0a2b42014-12-19 17:25:55 -060056endif
57
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -050058if HAVE_ARM_NE10
59CELT_SOURCES += $(CELT_SOURCES_ARM_NE10)
60endif
61
Timothy B. Terriberry39386e02013-11-18 13:30:13 -050062if OPUS_ARM_EXTERNAL_ASM
Timothy B. Terriberry0fe51432015-10-06 13:16:24 -040063noinst_LTLIBRARIES = libarmasm.la
64libarmasm_la_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S)
Timothy B. Terriberry39386e02013-11-18 13:30:13 -050065BUILT_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \
66 $(CELT_AM_SOURCES_ARM_ASM:.s.in=.s) \
Timothy B. Terriberry7a0b6822013-11-18 14:10:57 -050067 $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S)
Timothy B. Terriberry39386e02013-11-18 13:30:13 -050068endif
Aurélien Zanellicd4c8242013-05-31 15:07:00 +020069endif
70
Ralph Gilesd5cb0632013-11-19 17:50:05 +130071CLEANFILES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \
72 $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S)
73
Ralph Gilescd539df2012-04-05 09:23:47 -070074include celt_headers.mk
75include silk_headers.mk
76include opus_headers.mk
Jean-Marc Valin3596fed2011-07-09 09:20:51 -040077
Jean-Marc Valin8e4f5a82011-04-30 00:35:55 -040078libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
Gregory Maxwell8d2e9ad2012-08-10 17:21:28 -040079libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -050080libopus_la_LIBADD = $(NE10_LIBS) $(LIBM)
Timothy B. Terriberry0fe51432015-10-06 13:16:24 -040081if OPUS_ARM_EXTERNAL_ASM
82libopus_la_LIBADD += libarmasm.la
83endif
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040084
Andrew Allenf643c032017-11-07 13:26:23 -080085pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h include/opus_projection.h
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040086
Jean-Marc Valin3596fed2011-07-09 09:20:51 -040087noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
88
Aurélien Zanellifaec6732013-05-26 22:08:02 +020089if EXTRA_PROGRAMS
Jean-Marc Valin68688652017-02-14 19:06:10 -050090noinst_PROGRAMS = 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 opus_compare \
99 opus_demo \
100 repacketizer_demo \
101 silk/tests/test_unit_LPC_inv_pred_gain \
102 tests/test_opus_api \
103 tests/test_opus_decode \
104 tests/test_opus_encode \
Andrew Allenf643c032017-11-07 13:26:23 -0800105 tests/test_opus_padding \
106 tests/test_opus_projection
Jean-Marc Valine05aaf22011-04-29 19:48:42 -0400107
Jean-Marc Valin68688652017-02-14 19:06:10 -0500108TESTS = celt/tests/test_unit_cwrs32 \
109 celt/tests/test_unit_dft \
110 celt/tests/test_unit_entropy \
111 celt/tests/test_unit_laplace \
112 celt/tests/test_unit_mathops \
113 celt/tests/test_unit_mdct \
114 celt/tests/test_unit_rotation \
115 celt/tests/test_unit_types \
116 silk/tests/test_unit_LPC_inv_pred_gain \
117 tests/test_opus_api \
118 tests/test_opus_decode \
119 tests/test_opus_encode \
Andrew Allenf643c032017-11-07 13:26:23 -0800120 tests/test_opus_padding \
121 tests/test_opus_projection
Jean-Marc Valine05aaf22011-04-29 19:48:42 -0400122
Gregory Maxwella5ff49e2011-10-26 19:56:00 -0400123opus_demo_SOURCES = src/opus_demo.c
124
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -0500125opus_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Jean-Marc Valine8dbcb82011-08-10 09:47:30 -0400126
Gregory Maxwell38805f32011-10-26 20:05:56 -0400127repacketizer_demo_SOURCES = src/repacketizer_demo.c
Jean-Marc Valine8dbcb82011-08-10 09:47:30 -0400128
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -0500129repacketizer_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Ralph Giles9f713092011-08-28 22:32:13 +1200130
Jean-Marc Valinc4ca21f2011-09-15 10:10:40 -0700131opus_compare_SOURCES = src/opus_compare.c
Ron5bac4f22013-06-29 02:06:53 +0930132opus_compare_LDADD = $(LIBM)
Jean-Marc Valinc4ca21f2011-09-15 10:10:40 -0700133
Gregory Maxwell9652f812011-10-26 23:55:33 -0400134tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -0500135tests_test_opus_api_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Gregory Maxwella5ff49e2011-10-26 19:56:00 -0400136
Jean-Marc Valind0d1cf32016-10-29 14:45:30 -0400137tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/opus_encode_regressions.c tests/test_opus_common.h
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -0500138tests_test_opus_encode_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Gregory Maxwella5ff49e2011-10-26 19:56:00 -0400139
Gregory Maxwell9652f812011-10-26 23:55:33 -0400140tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -0500141tests_test_opus_decode_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -0400142
Ralph Gilese7ec9332012-11-30 18:00:38 -0800143tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -0500144tests_test_opus_padding_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Ralph Gilese7ec9332012-11-30 18:00:38 -0800145
Jean-Marc Valin45076372017-05-25 16:28:53 -0400146CELT_OBJ = $(CELT_SOURCES:.c=.lo)
147SILK_OBJ = $(SILK_SOURCES:.c=.lo)
Jean-Marc Valinef203132018-03-22 17:40:35 -0400148OPUS_OBJ = $(OPUS_SOURCES:.c=.lo)
149
150tests_test_opus_projection_SOURCES = tests/test_opus_projection.c tests/test_opus_common.h
151tests_test_opus_projection_LDADD = $(OPUS_OBJ) $(SILK_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
152if OPUS_ARM_EXTERNAL_ASM
153tests_test_opus_projection_LDADD += libarmasm.la
154endif
Jean-Marc Valin45076372017-05-25 16:28:53 -0400155
Jean-Marc Valin68688652017-02-14 19:06:10 -0500156silk_tests_test_unit_LPC_inv_pred_gain_SOURCES = silk/tests/test_unit_LPC_inv_pred_gain.c
Jean-Marc Valin45076372017-05-25 16:28:53 -0400157silk_tests_test_unit_LPC_inv_pred_gain_LDADD = $(SILK_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
158if OPUS_ARM_EXTERNAL_ASM
159silk_tests_test_unit_LPC_inv_pred_gain_LDADD += libarmasm.la
160endif
Jean-Marc Valin68688652017-02-14 19:06:10 -0500161
Gregory Maxwell9652f812011-10-26 23:55:33 -0400162celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
Ron5bac4f22013-06-29 02:06:53 +0930163celt_tests_test_unit_cwrs32_LDADD = $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -0400164
165celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
Jean-Marc Valin45076372017-05-25 16:28:53 -0400166celt_tests_test_unit_dft_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -0500167if OPUS_ARM_EXTERNAL_ASM
168celt_tests_test_unit_dft_LDADD += libarmasm.la
169endif
Gregory Maxwell9652f812011-10-26 23:55:33 -0400170
171celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
Ron5bac4f22013-06-29 02:06:53 +0930172celt_tests_test_unit_entropy_LDADD = $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -0400173
174celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
Ron5bac4f22013-06-29 02:06:53 +0930175celt_tests_test_unit_laplace_LDADD = $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -0400176
177celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
Jean-Marc Valin45076372017-05-25 16:28:53 -0400178celt_tests_test_unit_mathops_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
Tristan Matthewsfd562ee2014-10-12 15:12:52 -0400179if OPUS_ARM_EXTERNAL_ASM
Timothy B. Terriberry0fe51432015-10-06 13:16:24 -0400180celt_tests_test_unit_mathops_LDADD += libarmasm.la
Tristan Matthewsfd562ee2014-10-12 15:12:52 -0400181endif
Gregory Maxwell9652f812011-10-26 23:55:33 -0400182
183celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
Jean-Marc Valin45076372017-05-25 16:28:53 -0400184celt_tests_test_unit_mdct_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -0500185if OPUS_ARM_EXTERNAL_ASM
186celt_tests_test_unit_mdct_LDADD += libarmasm.la
187endif
Gregory Maxwell9652f812011-10-26 23:55:33 -0400188
189celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
Jean-Marc Valin45076372017-05-25 16:28:53 -0400190celt_tests_test_unit_rotation_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
Tristan Matthewsfd562ee2014-10-12 15:12:52 -0400191if OPUS_ARM_EXTERNAL_ASM
Timothy B. Terriberry0fe51432015-10-06 13:16:24 -0400192celt_tests_test_unit_rotation_LDADD += libarmasm.la
Tristan Matthewsfd562ee2014-10-12 15:12:52 -0400193endif
Gregory Maxwell9652f812011-10-26 23:55:33 -0400194
195celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
Ron5bac4f22013-06-29 02:06:53 +0930196celt_tests_test_unit_types_LDADD = $(LIBM)
Aurélien Zanellifaec6732013-05-26 22:08:02 +0200197endif
Gregory Maxwella5ff49e2011-10-26 19:56:00 -0400198
Jean-Marc Valin06237d72011-09-01 13:20:40 -0400199if CUSTOM_MODES
Jean-Marc Valin4923f3f2011-10-26 21:36:57 -0400200pkginclude_HEADERS += include/opus_custom.h
Aurélien Zanellifaec6732013-05-26 22:08:02 +0200201if EXTRA_PROGRAMS
Gregory Maxwella5ff49e2011-10-26 19:56:00 -0400202noinst_PROGRAMS += opus_custom_demo
203opus_custom_demo_SOURCES = celt/opus_custom_demo.c
Ron5bac4f22013-06-29 02:06:53 +0930204opus_custom_demo_LDADD = libopus.la $(LIBM)
Jean-Marc Valin06237d72011-09-01 13:20:40 -0400205endif
Aurélien Zanellifaec6732013-05-26 22:08:02 +0200206endif
Jean-Marc Valin06237d72011-09-01 13:20:40 -0400207
Ricardo Constantino8fe210f2016-11-05 02:03:07 +0000208EXTRA_DIST = opus.pc.in \
Gregory Maxwelle852c342012-08-09 07:29:58 -0400209 opus-uninstalled.pc.in \
Gregory Maxwell6e2dd162012-08-30 12:26:34 -0400210 opus.m4 \
Jean-Marc Valin45cbdff2015-02-11 14:10:03 -0500211 Makefile.mips \
Jean-Marc Valine91dfa02012-08-31 23:10:12 -0400212 Makefile.unix \
Gregory Maxwell1b58bc72012-08-19 16:45:20 -0400213 tests/run_vectors.sh \
Timothy B. Terriberry39386e02013-11-18 13:30:13 -0500214 celt/arm/arm2gnu.pl \
Ron135d1c92013-11-19 17:34:12 +1030215 celt/arm/celt_pitch_xcorr_arm.s \
Ralph Gilesa8f61152016-05-18 12:24:15 -0700216 win32/VS2015/opus.vcxproj \
Ralph Gilesa8f61152016-05-18 12:24:15 -0700217 win32/VS2015/test_opus_encode.vcxproj.filters \
Ralph Gilesa8f61152016-05-18 12:24:15 -0700218 win32/VS2015/test_opus_encode.vcxproj \
219 win32/VS2015/opus_demo.vcxproj \
220 win32/VS2015/test_opus_api.vcxproj.filters \
221 win32/VS2015/test_opus_api.vcxproj \
222 win32/VS2015/test_opus_decode.vcxproj.filters \
Ralph Gilesa8f61152016-05-18 12:24:15 -0700223 win32/VS2015/opus_demo.vcxproj.filters \
Ralph Gilesa8f61152016-05-18 12:24:15 -0700224 win32/VS2015/opus.vcxproj.filters \
225 win32/VS2015/test_opus_decode.vcxproj \
Ralph Gilesa8f61152016-05-18 12:24:15 -0700226 win32/VS2015/opus.sln \
Ricardo Constantino80567062017-02-21 02:24:27 +0000227 win32/VS2015/common.props \
Gregory Maxwelle852c342012-08-09 07:29:58 -0400228 win32/genversion.bat \
229 win32/config.h
Ralph Giles9f713092011-08-28 22:32:13 +1200230
231pkgconfigdir = $(libdir)/pkgconfig
232pkgconfig_DATA = opus.pc
Ronb6512b42012-05-21 23:16:39 +0930233
Gregory Maxwell6e2dd162012-08-30 12:26:34 -0400234m4datadir = $(datadir)/aclocal
235m4data_DATA = opus.m4
Ronb6512b42012-05-21 23:16:39 +0930236
237# Targets to build and install just the library without the docs
238opus check-opus install-opus: export NO_DOXYGEN = 1
239
240opus: all
241check-opus: check
242install-opus: install
243
244
245# Or just the docs
246docs:
Ronb371cf82012-10-18 14:05:55 +1030247 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
Ronb6512b42012-05-21 23:16:39 +0930248
249install-docs:
Ronb371cf82012-10-18 14:05:55 +1030250 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
Ronb6512b42012-05-21 23:16:39 +0930251
252
253# Or everything (by default)
254all-local:
Ronb371cf82012-10-18 14:05:55 +1030255 @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
Ronb6512b42012-05-21 23:16:39 +0930256
257install-data-local:
Ronb371cf82012-10-18 14:05:55 +1030258 @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
Ronb6512b42012-05-21 23:16:39 +0930259
260clean-local:
Ronb371cf82012-10-18 14:05:55 +1030261 -( cd doc && $(MAKE) $(AM_MAKEFLAGS) clean )
Ronb6512b42012-05-21 23:16:39 +0930262
263uninstall-local:
Ronb371cf82012-10-18 14:05:55 +1030264 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall )
Ronb6512b42012-05-21 23:16:39 +0930265
266
Ron2f2f9d62013-05-11 02:05:24 +0930267# We check this every time make is run, with configure.ac being touched to
268# trigger an update of the build system files if update_version changes the
269# current PACKAGE_VERSION (or if package_version was modified manually by a
270# user with either AUTO_UPDATE=no or no update_version script present - the
271# latter being the normal case for tarball releases).
272#
273# We can't just add the package_version file to CONFIGURE_DEPENDENCIES since
274# simply running autoconf will not actually regenerate configure for us when
275# the content of that file changes (due to autoconf dependency checking not
276# knowing about that without us creating yet another file for it to include).
277#
278# The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for
279# makes that don't support it. The only loss of functionality is not forcing
280# an update of package_version for `make dist` if AUTO_UPDATE=no, but that is
281# unlikely to be a real problem for any real user.
282$(top_srcdir)/configure.ac: force
283 @case "$(MAKECMDGOALS)" in \
284 dist-hook) exit 0 ;; \
285 dist-* | dist | distcheck | distclean) _arg=release ;; \
286 esac; \
287 if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \
Ron8d925ec2013-05-11 07:33:03 +0930288 if [ ! -e $(top_srcdir)/package_version ]; then \
289 echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \
290 fi; \
Ron2f2f9d62013-05-11 02:05:24 +0930291 . $(top_srcdir)/package_version || exit 1; \
292 [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \
293 fi; \
294 touch $@
295
296force:
297
298# Create a minimal package_version file when make dist is run.
299dist-hook:
300 echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version
301
302
Ronb6512b42012-05-21 23:16:39 +0930303.PHONY: opus check-opus install-opus docs install-docs
Timothy B. Terriberry39386e02013-11-18 13:30:13 -0500304
305# automake doesn't do dependency tracking for asm files, that I can tell
306$(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): celt/arm/armopts-gnu.S
307$(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): $(top_srcdir)/celt/arm/arm2gnu.pl
308
309# convert ARM asm to GNU as format
310%-gnu.S: $(top_srcdir)/%.s
Martin Storsjo76e831d2014-03-19 21:36:39 +0200311 $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@
Timothy B. Terriberry39386e02013-11-18 13:30:13 -0500312# For autoconf-modified sources (e.g., armopts.s)
313%-gnu.S: %.s
Timothy B. Terriberry4ae4bc62014-03-26 12:58:04 -0700314 $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@
xiangmingzhuc95c9a02014-04-30 15:48:07 +0800315
Jonathan Lennoxcb0875e2015-08-03 17:04:26 -0400316OPT_UNIT_TEST_OBJ = $(celt_tests_test_unit_mathops_SOURCES:.c=.o) \
317 $(celt_tests_test_unit_rotation_SOURCES:.c=.o) \
318 $(celt_tests_test_unit_mdct_SOURCES:.c=.o) \
Jean-Marc Valin68688652017-02-14 19:06:10 -0500319 $(celt_tests_test_unit_dft_SOURCES:.c=.o) \
320 $(silk_tests_test_unit_LPC_inv_pred_gain_SOURCES:.c=.o)
Jonathan Lennoxcb0875e2015-08-03 17:04:26 -0400321
322if HAVE_SSE
323SSE_OBJ = $(CELT_SOURCES_SSE:.c=.lo)
Jean-Marc Valin45076372017-05-25 16:28:53 -0400324$(SSE_OBJ): CFLAGS += $(OPUS_X86_SSE_CFLAGS)
Jonathan Lennoxcb0875e2015-08-03 17:04:26 -0400325endif
326
327if HAVE_SSE2
328SSE2_OBJ = $(CELT_SOURCES_SSE2:.c=.lo)
Jean-Marc Valin45076372017-05-25 16:28:53 -0400329$(SSE2_OBJ): CFLAGS += $(OPUS_X86_SSE2_CFLAGS)
Jonathan Lennoxcb0875e2015-08-03 17:04:26 -0400330endif
xiangmingzhuc95c9a02014-04-30 15:48:07 +0800331
332if HAVE_SSE4_1
Jonathan Lennoxcb0875e2015-08-03 17:04:26 -0400333SSE4_1_OBJ = $(CELT_SOURCES_SSE4_1:.c=.lo) \
334 $(SILK_SOURCES_SSE4_1:.c=.lo) \
335 $(SILK_SOURCES_FIXED_SSE4_1:.c=.lo)
Jean-Marc Valin45076372017-05-25 16:28:53 -0400336$(SSE4_1_OBJ): CFLAGS += $(OPUS_X86_SSE4_1_CFLAGS)
xiangmingzhuc95c9a02014-04-30 15:48:07 +0800337endif
Viswanath Puttagunta0b0a2b42014-12-19 17:25:55 -0600338
Jonathan Lennox8cb14872015-11-20 23:02:55 -0500339if HAVE_ARM_NEON_INTR
Linfeng Zhang8e195362016-07-13 16:40:48 -0700340ARM_NEON_INTR_OBJ = $(CELT_SOURCES_ARM_NEON_INTR:.c=.lo) \
341 $(SILK_SOURCES_ARM_NEON_INTR:.c=.lo) \
342 $(SILK_SOURCES_FIXED_ARM_NEON_INTR:.c=.lo)
Jean-Marc Valin45076372017-05-25 16:28:53 -0400343$(ARM_NEON_INTR_OBJ): CFLAGS += \
Viswanath Puttaguntaf48abe82015-05-15 12:42:19 -0500344 $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS)
Viswanath Puttagunta0b0a2b42014-12-19 17:25:55 -0600345endif