blob: edbcc42eb2e35fe7aa3e29ddc848f1b764d90b32 [file] [log] [blame]
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +00001# 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
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +00005AUTOMAKE_OPTIONS = subdir-objects
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +00006ACLOCAL_AMFLAGS = -I m4
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +00007
8lib_LTLIBRARIES = libopus.la
9
10DIST_SUBDIRS = doc
11
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000012AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \
13 -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000014
15include celt_sources.mk
16include silk_sources.mk
17include opus_sources.mk
18
19if FIXED_POINT
20SILK_SOURCES += $(SILK_SOURCES_FIXED)
21else
22SILK_SOURCES += $(SILK_SOURCES_FLOAT)
23endif
24
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000025OPUS_SOURCES += $(OPUS_SOURCES_FLOAT)
26
27if CPU_ARM
28CELT_SOURCES += $(CELT_SOURCES_ARM)
29endif
30
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000031include celt_headers.mk
32include silk_headers.mk
33include opus_headers.mk
34
35libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
36libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000037libopus_la_LIBADD = $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000038
39pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h
40
41noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
42
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000043if EXTRA_PROGRAMS
44noinst_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
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000045
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000046TESTS = 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
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000047
48opus_demo_SOURCES = src/opus_demo.c
49
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000050opus_demo_LDADD = libopus.la $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000051
52repacketizer_demo_SOURCES = src/repacketizer_demo.c
53
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000054repacketizer_demo_LDADD = libopus.la $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000055
56opus_compare_SOURCES = src/opus_compare.c
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000057opus_compare_LDADD = $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000058
59tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000060tests_test_opus_api_LDADD = libopus.la $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000061
62tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000063tests_test_opus_encode_LDADD = libopus.la $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000064
65tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000066tests_test_opus_decode_LDADD = libopus.la $(LIBM)
67
68tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h
69tests_test_opus_padding_LDADD = libopus.la $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000070
71celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000072celt_tests_test_unit_cwrs32_LDADD = $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000073
74celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000075celt_tests_test_unit_dft_LDADD = $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000076
77celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000078celt_tests_test_unit_entropy_LDADD = $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000079
80celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000081celt_tests_test_unit_laplace_LDADD = $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000082
83celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000084celt_tests_test_unit_mathops_LDADD = $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000085
86celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000087celt_tests_test_unit_mdct_LDADD = $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000088
89celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000090celt_tests_test_unit_rotation_LDADD = $(LIBM)
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000091
92celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000093celt_tests_test_unit_types_LDADD = $(LIBM)
94endif
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000095
96if CUSTOM_MODES
97pkginclude_HEADERS += include/opus_custom.h
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +000098if EXTRA_PROGRAMS
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +000099noinst_PROGRAMS += opus_custom_demo
100opus_custom_demo_SOURCES = celt/opus_custom_demo.c
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +0000101opus_custom_demo_LDADD = libopus.la $(LIBM)
102endif
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +0000103endif
104
105EXTRA_DIST = version.mk \
106 opus.pc.in \
107 opus-uninstalled.pc.in \
108 opus.m4 \
109 Makefile.unix \
110 tests/run_vectors.sh \
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +0000111 win32/VS2010/silk_float.vcxproj \
112 win32/VS2010/celt.vcxproj.filters \
113 win32/VS2010/opus.vcxproj \
114 win32/VS2010/silk_common.vcxproj.filters \
115 win32/VS2010/silk_float.vcxproj.filters \
116 win32/VS2010/test_opus_encode.vcxproj.filters \
117 win32/VS2010/silk_common.vcxproj \
118 win32/VS2010/test_opus_encode.vcxproj \
119 win32/VS2010/opus_demo.vcxproj \
120 win32/VS2010/test_opus_api.vcxproj.filters \
121 win32/VS2010/test_opus_api.vcxproj \
122 win32/VS2010/test_opus_decode.vcxproj.filters \
123 win32/VS2010/silk_fixed.vcxproj.filters \
124 win32/VS2010/opus_demo.vcxproj.filters \
125 win32/VS2010/silk_fixed.vcxproj \
126 win32/VS2010/opus.vcxproj.filters \
127 win32/VS2010/test_opus_decode.vcxproj \
128 win32/VS2010/celt.vcxproj \
129 win32/VS2010/opus.sln \
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +0000130 win32/genversion.bat \
131 win32/config.h
132
133pkgconfigdir = $(libdir)/pkgconfig
134pkgconfig_DATA = opus.pc
135
136m4datadir = $(datadir)/aclocal
137m4data_DATA = opus.m4
138
139# Targets to build and install just the library without the docs
140opus check-opus install-opus: export NO_DOXYGEN = 1
141
142opus: all
143check-opus: check
144install-opus: install
145
146
147# Or just the docs
148docs:
sergeyu@chromium.org6b6bee22013-02-28 21:17:26 +0000149 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +0000150
151install-docs:
sergeyu@chromium.org6b6bee22013-02-28 21:17:26 +0000152 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +0000153
154
155# Or everything (by default)
156all-local:
sergeyu@chromium.org6b6bee22013-02-28 21:17:26 +0000157 @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +0000158
159install-data-local:
sergeyu@chromium.org6b6bee22013-02-28 21:17:26 +0000160 @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +0000161
162clean-local:
sergeyu@chromium.org6b6bee22013-02-28 21:17:26 +0000163 -( cd doc && $(MAKE) $(AM_MAKEFLAGS) clean )
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +0000164
165uninstall-local:
sergeyu@chromium.org6b6bee22013-02-28 21:17:26 +0000166 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall )
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +0000167
168
tlegrand@chromium.orge3ea0492013-10-23 09:13:50 +0000169# We check this every time make is run, with configure.ac being touched to
170# trigger an update of the build system files if update_version changes the
171# current PACKAGE_VERSION (or if package_version was modified manually by a
172# user with either AUTO_UPDATE=no or no update_version script present - the
173# latter being the normal case for tarball releases).
174#
175# We can't just add the package_version file to CONFIGURE_DEPENDENCIES since
176# simply running autoconf will not actually regenerate configure for us when
177# the content of that file changes (due to autoconf dependency checking not
178# knowing about that without us creating yet another file for it to include).
179#
180# The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for
181# makes that don't support it. The only loss of functionality is not forcing
182# an update of package_version for `make dist` if AUTO_UPDATE=no, but that is
183# unlikely to be a real problem for any real user.
184$(top_srcdir)/configure.ac: force
185 @case "$(MAKECMDGOALS)" in \
186 dist-hook) exit 0 ;; \
187 dist-* | dist | distcheck | distclean) _arg=release ;; \
188 esac; \
189 if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \
190 if [ ! -e $(top_srcdir)/package_version ]; then \
191 echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \
192 fi; \
193 . $(top_srcdir)/package_version || exit 1; \
194 [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \
195 fi; \
196 touch $@
197
198force:
199
200# Create a minimal package_version file when make dist is run.
201dist-hook:
202 echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version
203
204
sergeyu@chromium.org885f2ff2012-10-17 22:31:52 +0000205.PHONY: opus check-opus install-opus docs install-docs