Adds SSE support (only xcorr_kernel() for now)
[opus.git] / Makefile.am
1 AUTOMAKE_OPTIONS = subdir-objects
2 ACLOCAL_AMFLAGS = -I m4
3
4 lib_LTLIBRARIES = libopus.la
5
6 DIST_SUBDIRS = doc
7
8 INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
9
10 include celt_sources.mk
11 include silk_sources.mk
12 include opus_sources.mk
13
14 if FIXED_POINT
15 SILK_SOURCES += $(SILK_SOURCES_FIXED)
16 else
17 SILK_SOURCES += $(SILK_SOURCES_FLOAT)
18 OPUS_SOURCES += $(OPUS_SOURCES_FLOAT)
19 endif
20
21 if CPU_ARM
22 CELT_SOURCES += $(CELT_SOURCES_ARM)
23 endif
24
25 include celt_headers.mk
26 include silk_headers.mk
27 include opus_headers.mk
28
29 libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
30 libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@
31
32 pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h
33
34 noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
35
36 if EXTRA_PROGRAMS
37 noinst_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
38
39 TESTS = 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
40
41 opus_demo_SOURCES = src/opus_demo.c
42
43 opus_demo_LDADD = libopus.la -lm
44
45 repacketizer_demo_SOURCES = src/repacketizer_demo.c
46
47 repacketizer_demo_LDADD = libopus.la -lm
48
49 opus_compare_SOURCES = src/opus_compare.c
50 opus_compare_LDADD = -lm
51
52 tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
53 tests_test_opus_api_LDADD = libopus.la -lm
54
55 tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h
56 tests_test_opus_encode_LDADD = libopus.la -lm
57
58 tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
59 tests_test_opus_decode_LDADD = libopus.la -lm
60
61 tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h
62 tests_test_opus_padding_LDADD = libopus.la -lm
63
64 celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
65 celt_tests_test_unit_cwrs32_LDADD = -lm
66
67 celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
68 celt_tests_test_unit_dft_LDADD = -lm
69
70 celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
71 celt_tests_test_unit_entropy_LDADD = -lm
72
73 celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
74 celt_tests_test_unit_laplace_LDADD = -lm
75
76 celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
77 celt_tests_test_unit_mathops_LDADD = -lm
78
79 celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
80 celt_tests_test_unit_mdct_LDADD = -lm
81
82 celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
83 celt_tests_test_unit_rotation_LDADD = -lm
84
85 celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
86 celt_tests_test_unit_types_LDADD = -lm
87 endif
88
89 if CUSTOM_MODES
90 pkginclude_HEADERS += include/opus_custom.h
91 if EXTRA_PROGRAMS
92 noinst_PROGRAMS += opus_custom_demo
93 opus_custom_demo_SOURCES = celt/opus_custom_demo.c
94 opus_custom_demo_LDADD = libopus.la -lm
95 endif
96 endif
97
98 EXTRA_DIST = version.mk \
99              opus.pc.in \
100              opus-uninstalled.pc.in \
101              opus.m4 \
102              Makefile.unix \
103              tests/run_vectors.sh \
104              opus.sln \
105              celt/celt.vcxproj \
106              celt/celt.vcxproj.filters \
107              src/opus_demo.vcxproj \
108              src/opus.vcxproj \
109              src/opus.vcxproj.filters \
110              src/opus_demo.vcxproj.filters \
111              tests/test_opus_decode.vcxproj.filters \
112              tests/test_opus_decode.vcxproj \
113              tests/test_opus_encode.vcxproj.filters \
114              tests/test_opus_encode.vcxproj \
115              tests/test_opus_api.vcxproj.filters \
116              tests/test_opus_api.vcxproj \
117              silk/float/silk_float.vcxproj.filters \
118              silk/float/silk_float.vcxproj \
119              silk/fixed/silk_fixed.vcxproj.filters \
120              silk/fixed/silk_fixed.vcxproj \
121              silk/silk_common.vcxproj \
122              silk/silk_common.vcxproj.filters \
123              win32/genversion.bat \
124              win32/config.h
125
126 pkgconfigdir = $(libdir)/pkgconfig
127 pkgconfig_DATA = opus.pc
128
129 m4datadir = $(datadir)/aclocal
130 m4data_DATA = opus.m4
131
132 # Targets to build and install just the library without the docs
133 opus check-opus install-opus: export NO_DOXYGEN = 1
134
135 opus: all
136 check-opus: check
137 install-opus: install
138
139
140 # Or just the docs
141 docs:
142         ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
143
144 install-docs:
145         ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
146
147
148 # Or everything (by default)
149 all-local:
150         @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
151
152 install-data-local:
153         @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
154
155 clean-local:
156         -( cd doc && $(MAKE) $(AM_MAKEFLAGS) clean )
157
158 uninstall-local:
159         ( cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall )
160
161
162 # We check this every time make is run, with configure.ac being touched to
163 # trigger an update of the build system files if update_version changes the
164 # current PACKAGE_VERSION (or if package_version was modified manually by a
165 # user with either AUTO_UPDATE=no or no update_version script present - the
166 # latter being the normal case for tarball releases).
167 #
168 # We can't just add the package_version file to CONFIGURE_DEPENDENCIES since
169 # simply running autoconf will not actually regenerate configure for us when
170 # the content of that file changes (due to autoconf dependency checking not
171 # knowing about that without us creating yet another file for it to include).
172 #
173 # The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for
174 # makes that don't support it.  The only loss of functionality is not forcing
175 # an update of package_version for `make dist` if AUTO_UPDATE=no, but that is
176 # unlikely to be a real problem for any real user.
177 $(top_srcdir)/configure.ac: force
178         @case "$(MAKECMDGOALS)" in \
179             dist-hook)                             exit 0       ;; \
180             dist-* | dist | distcheck | distclean) _arg=release ;; \
181         esac; \
182         if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \
183             if [ ! -e $(top_srcdir)/package_version ]; then \
184                 echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \
185             fi; \
186             . $(top_srcdir)/package_version || exit 1; \
187             [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \
188         fi; \
189         touch $@
190
191 force:
192
193 # Create a minimal package_version file when make dist is run.
194 dist-hook:
195         echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version
196
197
198 .PHONY: opus check-opus install-opus docs install-docs