• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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+).
3export VERBOSE = yes
4
5AUTOMAKE_OPTIONS = subdir-objects
6ACLOCAL_AMFLAGS = -I m4
7
8lib_LTLIBRARIES = libopus.la
9
10DIST_SUBDIRS = doc
11
12AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \
13              -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
14
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
25OPUS_SOURCES += $(OPUS_SOURCES_FLOAT)
26
27if CPU_ARM
28CELT_SOURCES += $(CELT_SOURCES_ARM)
29endif
30
31include 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@
37libopus_la_LIBADD = $(LIBM)
38
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
43if 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
45
46TESTS = 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
47
48opus_demo_SOURCES = src/opus_demo.c
49
50opus_demo_LDADD = libopus.la $(LIBM)
51
52repacketizer_demo_SOURCES = src/repacketizer_demo.c
53
54repacketizer_demo_LDADD = libopus.la $(LIBM)
55
56opus_compare_SOURCES = src/opus_compare.c
57opus_compare_LDADD = $(LIBM)
58
59tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
60tests_test_opus_api_LDADD = libopus.la $(LIBM)
61
62tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h
63tests_test_opus_encode_LDADD = libopus.la $(LIBM)
64
65tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
66tests_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)
70
71celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
72celt_tests_test_unit_cwrs32_LDADD = $(LIBM)
73
74celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
75celt_tests_test_unit_dft_LDADD = $(LIBM)
76
77celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
78celt_tests_test_unit_entropy_LDADD = $(LIBM)
79
80celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
81celt_tests_test_unit_laplace_LDADD = $(LIBM)
82
83celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
84celt_tests_test_unit_mathops_LDADD = $(LIBM)
85
86celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
87celt_tests_test_unit_mdct_LDADD = $(LIBM)
88
89celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
90celt_tests_test_unit_rotation_LDADD = $(LIBM)
91
92celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
93celt_tests_test_unit_types_LDADD = $(LIBM)
94endif
95
96if CUSTOM_MODES
97pkginclude_HEADERS += include/opus_custom.h
98if EXTRA_PROGRAMS
99noinst_PROGRAMS += opus_custom_demo
100opus_custom_demo_SOURCES = celt/opus_custom_demo.c
101opus_custom_demo_LDADD = libopus.la $(LIBM)
102endif
103endif
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 \
111             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 \
130             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:
149	( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
150
151install-docs:
152	( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
153
154
155# Or everything (by default)
156all-local:
157	@[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
158
159install-data-local:
160	@[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
161
162clean-local:
163	-( cd doc && $(MAKE) $(AM_MAKEFLAGS) clean )
164
165uninstall-local:
166	( cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall )
167
168
169# 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
205.PHONY: opus check-opus install-opus docs install-docs
206