blob: 20286f843960151c34878773f578839bc14710cf [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 \
13 -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
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)
21else
22SILK_SOURCES += $(SILK_SOURCES_FLOAT)
23endif
24
Jean-Marc Valind814c5d2013-11-04 12:26:50 -050025if DISABLE_FLOAT_API
26else
Jean-Marc Valin3ab03e02013-09-06 16:00:39 -040027OPUS_SOURCES += $(OPUS_SOURCES_FLOAT)
Jean-Marc Valind814c5d2013-11-04 12:26:50 -050028endif
Jean-Marc Valin3ab03e02013-09-06 16:00:39 -040029
Aurélien Zanellicd4c8242013-05-31 15:07:00 +020030if CPU_ARM
31CELT_SOURCES += $(CELT_SOURCES_ARM)
32endif
33
Ralph Gilescd539df2012-04-05 09:23:47 -070034include celt_headers.mk
35include silk_headers.mk
36include opus_headers.mk
Jean-Marc Valin3596fed2011-07-09 09:20:51 -040037
Jean-Marc Valin8e4f5a82011-04-30 00:35:55 -040038libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
Gregory Maxwell8d2e9ad2012-08-10 17:21:28 -040039libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@
Ron45106b72013-07-02 17:01:23 +093040libopus_la_LIBADD = $(LIBM)
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040041
Jean-Marc Valin4923f3f2011-10-26 21:36:57 -040042pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040043
Jean-Marc Valin3596fed2011-07-09 09:20:51 -040044noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
45
Aurélien Zanellifaec6732013-05-26 22:08:02 +020046if EXTRA_PROGRAMS
Ralph Gilese7ec9332012-11-30 18:00:38 -080047noinst_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
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040048
Ralph Gilese7ec9332012-11-30 18:00:38 -080049TESTS = 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
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040050
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040051opus_demo_SOURCES = src/opus_demo.c
52
Ron5bac4f22013-06-29 02:06:53 +093053opus_demo_LDADD = libopus.la $(LIBM)
Jean-Marc Valine8dbcb82011-08-10 09:47:30 -040054
Gregory Maxwell38805f32011-10-26 20:05:56 -040055repacketizer_demo_SOURCES = src/repacketizer_demo.c
Jean-Marc Valine8dbcb82011-08-10 09:47:30 -040056
Ron5bac4f22013-06-29 02:06:53 +093057repacketizer_demo_LDADD = libopus.la $(LIBM)
Ralph Giles9f713092011-08-28 22:32:13 +120058
Jean-Marc Valinc4ca21f2011-09-15 10:10:40 -070059opus_compare_SOURCES = src/opus_compare.c
Ron5bac4f22013-06-29 02:06:53 +093060opus_compare_LDADD = $(LIBM)
Jean-Marc Valinc4ca21f2011-09-15 10:10:40 -070061
Gregory Maxwell9652f812011-10-26 23:55:33 -040062tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
Ron5bac4f22013-06-29 02:06:53 +093063tests_test_opus_api_LDADD = libopus.la $(LIBM)
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040064
Gregory Maxwell9652f812011-10-26 23:55:33 -040065tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h
Ron5bac4f22013-06-29 02:06:53 +093066tests_test_opus_encode_LDADD = libopus.la $(LIBM)
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040067
Gregory Maxwell9652f812011-10-26 23:55:33 -040068tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
Ron5bac4f22013-06-29 02:06:53 +093069tests_test_opus_decode_LDADD = libopus.la $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -040070
Ralph Gilese7ec9332012-11-30 18:00:38 -080071tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h
Ron5bac4f22013-06-29 02:06:53 +093072tests_test_opus_padding_LDADD = libopus.la $(LIBM)
Ralph Gilese7ec9332012-11-30 18:00:38 -080073
Gregory Maxwell9652f812011-10-26 23:55:33 -040074celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
Ron5bac4f22013-06-29 02:06:53 +093075celt_tests_test_unit_cwrs32_LDADD = $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -040076
77celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
Ron5bac4f22013-06-29 02:06:53 +093078celt_tests_test_unit_dft_LDADD = $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -040079
80celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
Ron5bac4f22013-06-29 02:06:53 +093081celt_tests_test_unit_entropy_LDADD = $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -040082
83celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
Ron5bac4f22013-06-29 02:06:53 +093084celt_tests_test_unit_laplace_LDADD = $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -040085
86celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
Ron5bac4f22013-06-29 02:06:53 +093087celt_tests_test_unit_mathops_LDADD = $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -040088
89celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
Ron5bac4f22013-06-29 02:06:53 +093090celt_tests_test_unit_mdct_LDADD = $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -040091
92celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
Ron5bac4f22013-06-29 02:06:53 +093093celt_tests_test_unit_rotation_LDADD = $(LIBM)
Gregory Maxwell9652f812011-10-26 23:55:33 -040094
95celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
Ron5bac4f22013-06-29 02:06:53 +093096celt_tests_test_unit_types_LDADD = $(LIBM)
Aurélien Zanellifaec6732013-05-26 22:08:02 +020097endif
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040098
Jean-Marc Valin06237d72011-09-01 13:20:40 -040099if CUSTOM_MODES
Jean-Marc Valin4923f3f2011-10-26 21:36:57 -0400100pkginclude_HEADERS += include/opus_custom.h
Aurélien Zanellifaec6732013-05-26 22:08:02 +0200101if EXTRA_PROGRAMS
Gregory Maxwella5ff49e2011-10-26 19:56:00 -0400102noinst_PROGRAMS += opus_custom_demo
103opus_custom_demo_SOURCES = celt/opus_custom_demo.c
Ron5bac4f22013-06-29 02:06:53 +0930104opus_custom_demo_LDADD = libopus.la $(LIBM)
Jean-Marc Valin06237d72011-09-01 13:20:40 -0400105endif
Aurélien Zanellifaec6732013-05-26 22:08:02 +0200106endif
Jean-Marc Valin06237d72011-09-01 13:20:40 -0400107
Ralph Giles59c5a822012-08-16 11:39:56 -0700108EXTRA_DIST = version.mk \
109 opus.pc.in \
Gregory Maxwelle852c342012-08-09 07:29:58 -0400110 opus-uninstalled.pc.in \
Gregory Maxwell6e2dd162012-08-30 12:26:34 -0400111 opus.m4 \
Jean-Marc Valine91dfa02012-08-31 23:10:12 -0400112 Makefile.unix \
Gregory Maxwell1b58bc72012-08-19 16:45:20 -0400113 tests/run_vectors.sh \
Jean-Marc Valinaecebff2013-06-27 04:04:48 -0400114 win32/VS2010/silk_float.vcxproj \
115 win32/VS2010/celt.vcxproj.filters \
116 win32/VS2010/opus.vcxproj \
117 win32/VS2010/silk_common.vcxproj.filters \
118 win32/VS2010/silk_float.vcxproj.filters \
119 win32/VS2010/test_opus_encode.vcxproj.filters \
120 win32/VS2010/silk_common.vcxproj \
121 win32/VS2010/test_opus_encode.vcxproj \
122 win32/VS2010/opus_demo.vcxproj \
123 win32/VS2010/test_opus_api.vcxproj.filters \
124 win32/VS2010/test_opus_api.vcxproj \
125 win32/VS2010/test_opus_decode.vcxproj.filters \
126 win32/VS2010/silk_fixed.vcxproj.filters \
127 win32/VS2010/opus_demo.vcxproj.filters \
128 win32/VS2010/silk_fixed.vcxproj \
129 win32/VS2010/opus.vcxproj.filters \
130 win32/VS2010/test_opus_decode.vcxproj \
131 win32/VS2010/celt.vcxproj \
132 win32/VS2010/opus.sln \
Gregory Maxwelle852c342012-08-09 07:29:58 -0400133 win32/genversion.bat \
134 win32/config.h
Ralph Giles9f713092011-08-28 22:32:13 +1200135
136pkgconfigdir = $(libdir)/pkgconfig
137pkgconfig_DATA = opus.pc
Ronb6512b42012-05-21 23:16:39 +0930138
Gregory Maxwell6e2dd162012-08-30 12:26:34 -0400139m4datadir = $(datadir)/aclocal
140m4data_DATA = opus.m4
Ronb6512b42012-05-21 23:16:39 +0930141
142# Targets to build and install just the library without the docs
143opus check-opus install-opus: export NO_DOXYGEN = 1
144
145opus: all
146check-opus: check
147install-opus: install
148
149
150# Or just the docs
151docs:
Ronb371cf82012-10-18 14:05:55 +1030152 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
Ronb6512b42012-05-21 23:16:39 +0930153
154install-docs:
Ronb371cf82012-10-18 14:05:55 +1030155 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
Ronb6512b42012-05-21 23:16:39 +0930156
157
158# Or everything (by default)
159all-local:
Ronb371cf82012-10-18 14:05:55 +1030160 @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
Ronb6512b42012-05-21 23:16:39 +0930161
162install-data-local:
Ronb371cf82012-10-18 14:05:55 +1030163 @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
Ronb6512b42012-05-21 23:16:39 +0930164
165clean-local:
Ronb371cf82012-10-18 14:05:55 +1030166 -( cd doc && $(MAKE) $(AM_MAKEFLAGS) clean )
Ronb6512b42012-05-21 23:16:39 +0930167
168uninstall-local:
Ronb371cf82012-10-18 14:05:55 +1030169 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall )
Ronb6512b42012-05-21 23:16:39 +0930170
171
Ron2f2f9d62013-05-11 02:05:24 +0930172# We check this every time make is run, with configure.ac being touched to
173# trigger an update of the build system files if update_version changes the
174# current PACKAGE_VERSION (or if package_version was modified manually by a
175# user with either AUTO_UPDATE=no or no update_version script present - the
176# latter being the normal case for tarball releases).
177#
178# We can't just add the package_version file to CONFIGURE_DEPENDENCIES since
179# simply running autoconf will not actually regenerate configure for us when
180# the content of that file changes (due to autoconf dependency checking not
181# knowing about that without us creating yet another file for it to include).
182#
183# The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for
184# makes that don't support it. The only loss of functionality is not forcing
185# an update of package_version for `make dist` if AUTO_UPDATE=no, but that is
186# unlikely to be a real problem for any real user.
187$(top_srcdir)/configure.ac: force
188 @case "$(MAKECMDGOALS)" in \
189 dist-hook) exit 0 ;; \
190 dist-* | dist | distcheck | distclean) _arg=release ;; \
191 esac; \
192 if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \
Ron8d925ec2013-05-11 07:33:03 +0930193 if [ ! -e $(top_srcdir)/package_version ]; then \
194 echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \
195 fi; \
Ron2f2f9d62013-05-11 02:05:24 +0930196 . $(top_srcdir)/package_version || exit 1; \
197 [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \
198 fi; \
199 touch $@
200
201force:
202
203# Create a minimal package_version file when make dist is run.
204dist-hook:
205 echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version
206
207
Ronb6512b42012-05-21 23:16:39 +0930208.PHONY: opus check-opus install-opus docs install-docs