annotate src/opus-1.3/Makefile.am @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents 7aeed7906520
children
rev   line source
Chris@69 1 # Provide the full test output for failed tests when using the parallel
Chris@69 2 # test suite (which is enabled by default with automake 1.13+).
Chris@69 3 export VERBOSE = yes
Chris@69 4
Chris@69 5 AUTOMAKE_OPTIONS = subdir-objects
Chris@69 6 ACLOCAL_AMFLAGS = -I m4
Chris@69 7
Chris@69 8 lib_LTLIBRARIES = libopus.la
Chris@69 9
Chris@69 10 DIST_SUBDIRS = doc
Chris@69 11
Chris@69 12 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \
Chris@69 13 -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed $(NE10_CFLAGS)
Chris@69 14
Chris@69 15 include celt_sources.mk
Chris@69 16 include silk_sources.mk
Chris@69 17 include opus_sources.mk
Chris@69 18
Chris@69 19 if FIXED_POINT
Chris@69 20 SILK_SOURCES += $(SILK_SOURCES_FIXED)
Chris@69 21 if HAVE_SSE4_1
Chris@69 22 SILK_SOURCES += $(SILK_SOURCES_SSE4_1) $(SILK_SOURCES_FIXED_SSE4_1)
Chris@69 23 endif
Chris@69 24 if HAVE_ARM_NEON_INTR
Chris@69 25 SILK_SOURCES += $(SILK_SOURCES_FIXED_ARM_NEON_INTR)
Chris@69 26 endif
Chris@69 27 else
Chris@69 28 SILK_SOURCES += $(SILK_SOURCES_FLOAT)
Chris@69 29 if HAVE_SSE4_1
Chris@69 30 SILK_SOURCES += $(SILK_SOURCES_SSE4_1)
Chris@69 31 endif
Chris@69 32 endif
Chris@69 33
Chris@69 34 if DISABLE_FLOAT_API
Chris@69 35 else
Chris@69 36 OPUS_SOURCES += $(OPUS_SOURCES_FLOAT)
Chris@69 37 endif
Chris@69 38
Chris@69 39 if HAVE_SSE
Chris@69 40 CELT_SOURCES += $(CELT_SOURCES_SSE)
Chris@69 41 endif
Chris@69 42 if HAVE_SSE2
Chris@69 43 CELT_SOURCES += $(CELT_SOURCES_SSE2)
Chris@69 44 endif
Chris@69 45 if HAVE_SSE4_1
Chris@69 46 CELT_SOURCES += $(CELT_SOURCES_SSE4_1)
Chris@69 47 endif
Chris@69 48
Chris@69 49 if CPU_ARM
Chris@69 50 CELT_SOURCES += $(CELT_SOURCES_ARM)
Chris@69 51 SILK_SOURCES += $(SILK_SOURCES_ARM)
Chris@69 52
Chris@69 53 if HAVE_ARM_NEON_INTR
Chris@69 54 CELT_SOURCES += $(CELT_SOURCES_ARM_NEON_INTR)
Chris@69 55 SILK_SOURCES += $(SILK_SOURCES_ARM_NEON_INTR)
Chris@69 56 endif
Chris@69 57
Chris@69 58 if HAVE_ARM_NE10
Chris@69 59 CELT_SOURCES += $(CELT_SOURCES_ARM_NE10)
Chris@69 60 endif
Chris@69 61
Chris@69 62 if OPUS_ARM_EXTERNAL_ASM
Chris@69 63 noinst_LTLIBRARIES = libarmasm.la
Chris@69 64 libarmasm_la_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S)
Chris@69 65 BUILT_SOURCES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \
Chris@69 66 $(CELT_AM_SOURCES_ARM_ASM:.s.in=.s) \
Chris@69 67 $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S)
Chris@69 68 endif
Chris@69 69 endif
Chris@69 70
Chris@69 71 CLEANFILES = $(CELT_SOURCES_ARM_ASM:.s=-gnu.S) \
Chris@69 72 $(CELT_AM_SOURCES_ARM_ASM:.s.in=-gnu.S)
Chris@69 73
Chris@69 74 include celt_headers.mk
Chris@69 75 include silk_headers.mk
Chris@69 76 include opus_headers.mk
Chris@69 77
Chris@69 78 libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
Chris@69 79 libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@
Chris@69 80 libopus_la_LIBADD = $(NE10_LIBS) $(LIBM)
Chris@69 81 if OPUS_ARM_EXTERNAL_ASM
Chris@69 82 libopus_la_LIBADD += libarmasm.la
Chris@69 83 endif
Chris@69 84
Chris@69 85 pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h include/opus_projection.h
Chris@69 86
Chris@69 87 noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
Chris@69 88
Chris@69 89 if EXTRA_PROGRAMS
Chris@69 90 noinst_PROGRAMS = celt/tests/test_unit_cwrs32 \
Chris@69 91 celt/tests/test_unit_dft \
Chris@69 92 celt/tests/test_unit_entropy \
Chris@69 93 celt/tests/test_unit_laplace \
Chris@69 94 celt/tests/test_unit_mathops \
Chris@69 95 celt/tests/test_unit_mdct \
Chris@69 96 celt/tests/test_unit_rotation \
Chris@69 97 celt/tests/test_unit_types \
Chris@69 98 opus_compare \
Chris@69 99 opus_demo \
Chris@69 100 repacketizer_demo \
Chris@69 101 silk/tests/test_unit_LPC_inv_pred_gain \
Chris@69 102 tests/test_opus_api \
Chris@69 103 tests/test_opus_decode \
Chris@69 104 tests/test_opus_encode \
Chris@69 105 tests/test_opus_padding \
Chris@69 106 tests/test_opus_projection
Chris@69 107
Chris@69 108 TESTS = celt/tests/test_unit_cwrs32 \
Chris@69 109 celt/tests/test_unit_dft \
Chris@69 110 celt/tests/test_unit_entropy \
Chris@69 111 celt/tests/test_unit_laplace \
Chris@69 112 celt/tests/test_unit_mathops \
Chris@69 113 celt/tests/test_unit_mdct \
Chris@69 114 celt/tests/test_unit_rotation \
Chris@69 115 celt/tests/test_unit_types \
Chris@69 116 silk/tests/test_unit_LPC_inv_pred_gain \
Chris@69 117 tests/test_opus_api \
Chris@69 118 tests/test_opus_decode \
Chris@69 119 tests/test_opus_encode \
Chris@69 120 tests/test_opus_padding \
Chris@69 121 tests/test_opus_projection
Chris@69 122
Chris@69 123 opus_demo_SOURCES = src/opus_demo.c
Chris@69 124
Chris@69 125 opus_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Chris@69 126
Chris@69 127 repacketizer_demo_SOURCES = src/repacketizer_demo.c
Chris@69 128
Chris@69 129 repacketizer_demo_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Chris@69 130
Chris@69 131 opus_compare_SOURCES = src/opus_compare.c
Chris@69 132 opus_compare_LDADD = $(LIBM)
Chris@69 133
Chris@69 134 tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
Chris@69 135 tests_test_opus_api_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Chris@69 136
Chris@69 137 tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/opus_encode_regressions.c tests/test_opus_common.h
Chris@69 138 tests_test_opus_encode_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Chris@69 139
Chris@69 140 tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
Chris@69 141 tests_test_opus_decode_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Chris@69 142
Chris@69 143 tests_test_opus_padding_SOURCES = tests/test_opus_padding.c tests/test_opus_common.h
Chris@69 144 tests_test_opus_padding_LDADD = libopus.la $(NE10_LIBS) $(LIBM)
Chris@69 145
Chris@69 146 CELT_OBJ = $(CELT_SOURCES:.c=.lo)
Chris@69 147 SILK_OBJ = $(SILK_SOURCES:.c=.lo)
Chris@69 148 OPUS_OBJ = $(OPUS_SOURCES:.c=.lo)
Chris@69 149
Chris@69 150 tests_test_opus_projection_SOURCES = tests/test_opus_projection.c tests/test_opus_common.h
Chris@69 151 tests_test_opus_projection_LDADD = $(OPUS_OBJ) $(SILK_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
Chris@69 152 if OPUS_ARM_EXTERNAL_ASM
Chris@69 153 tests_test_opus_projection_LDADD += libarmasm.la
Chris@69 154 endif
Chris@69 155
Chris@69 156 silk_tests_test_unit_LPC_inv_pred_gain_SOURCES = silk/tests/test_unit_LPC_inv_pred_gain.c
Chris@69 157 silk_tests_test_unit_LPC_inv_pred_gain_LDADD = $(SILK_OBJ) $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
Chris@69 158 if OPUS_ARM_EXTERNAL_ASM
Chris@69 159 silk_tests_test_unit_LPC_inv_pred_gain_LDADD += libarmasm.la
Chris@69 160 endif
Chris@69 161
Chris@69 162 celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
Chris@69 163 celt_tests_test_unit_cwrs32_LDADD = $(LIBM)
Chris@69 164
Chris@69 165 celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
Chris@69 166 celt_tests_test_unit_dft_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
Chris@69 167 if OPUS_ARM_EXTERNAL_ASM
Chris@69 168 celt_tests_test_unit_dft_LDADD += libarmasm.la
Chris@69 169 endif
Chris@69 170
Chris@69 171 celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
Chris@69 172 celt_tests_test_unit_entropy_LDADD = $(LIBM)
Chris@69 173
Chris@69 174 celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
Chris@69 175 celt_tests_test_unit_laplace_LDADD = $(LIBM)
Chris@69 176
Chris@69 177 celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
Chris@69 178 celt_tests_test_unit_mathops_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
Chris@69 179 if OPUS_ARM_EXTERNAL_ASM
Chris@69 180 celt_tests_test_unit_mathops_LDADD += libarmasm.la
Chris@69 181 endif
Chris@69 182
Chris@69 183 celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
Chris@69 184 celt_tests_test_unit_mdct_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
Chris@69 185 if OPUS_ARM_EXTERNAL_ASM
Chris@69 186 celt_tests_test_unit_mdct_LDADD += libarmasm.la
Chris@69 187 endif
Chris@69 188
Chris@69 189 celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
Chris@69 190 celt_tests_test_unit_rotation_LDADD = $(CELT_OBJ) $(NE10_LIBS) $(LIBM)
Chris@69 191 if OPUS_ARM_EXTERNAL_ASM
Chris@69 192 celt_tests_test_unit_rotation_LDADD += libarmasm.la
Chris@69 193 endif
Chris@69 194
Chris@69 195 celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
Chris@69 196 celt_tests_test_unit_types_LDADD = $(LIBM)
Chris@69 197 endif
Chris@69 198
Chris@69 199 if CUSTOM_MODES
Chris@69 200 pkginclude_HEADERS += include/opus_custom.h
Chris@69 201 if EXTRA_PROGRAMS
Chris@69 202 noinst_PROGRAMS += opus_custom_demo
Chris@69 203 opus_custom_demo_SOURCES = celt/opus_custom_demo.c
Chris@69 204 opus_custom_demo_LDADD = libopus.la $(LIBM)
Chris@69 205 endif
Chris@69 206 endif
Chris@69 207
Chris@69 208 EXTRA_DIST = opus.pc.in \
Chris@69 209 opus-uninstalled.pc.in \
Chris@69 210 opus.m4 \
Chris@69 211 Makefile.mips \
Chris@69 212 Makefile.unix \
Chris@69 213 tests/run_vectors.sh \
Chris@69 214 celt/arm/arm2gnu.pl \
Chris@69 215 celt/arm/celt_pitch_xcorr_arm.s \
Chris@69 216 win32/VS2015/opus.vcxproj \
Chris@69 217 win32/VS2015/test_opus_encode.vcxproj.filters \
Chris@69 218 win32/VS2015/test_opus_encode.vcxproj \
Chris@69 219 win32/VS2015/opus_demo.vcxproj \
Chris@69 220 win32/VS2015/test_opus_api.vcxproj.filters \
Chris@69 221 win32/VS2015/test_opus_api.vcxproj \
Chris@69 222 win32/VS2015/test_opus_decode.vcxproj.filters \
Chris@69 223 win32/VS2015/opus_demo.vcxproj.filters \
Chris@69 224 win32/VS2015/opus.vcxproj.filters \
Chris@69 225 win32/VS2015/test_opus_decode.vcxproj \
Chris@69 226 win32/VS2015/opus.sln \
Chris@69 227 win32/VS2015/common.props \
Chris@69 228 win32/genversion.bat \
Chris@69 229 win32/config.h
Chris@69 230
Chris@69 231 pkgconfigdir = $(libdir)/pkgconfig
Chris@69 232 pkgconfig_DATA = opus.pc
Chris@69 233
Chris@69 234 m4datadir = $(datadir)/aclocal
Chris@69 235 m4data_DATA = opus.m4
Chris@69 236
Chris@69 237 # Targets to build and install just the library without the docs
Chris@69 238 opus check-opus install-opus: export NO_DOXYGEN = 1
Chris@69 239
Chris@69 240 opus: all
Chris@69 241 check-opus: check
Chris@69 242 install-opus: install
Chris@69 243
Chris@69 244
Chris@69 245 # Or just the docs
Chris@69 246 docs:
Chris@69 247 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
Chris@69 248
Chris@69 249 install-docs:
Chris@69 250 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
Chris@69 251
Chris@69 252
Chris@69 253 # Or everything (by default)
Chris@69 254 all-local:
Chris@69 255 @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) )
Chris@69 256
Chris@69 257 install-data-local:
Chris@69 258 @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && $(MAKE) $(AM_MAKEFLAGS) install )
Chris@69 259
Chris@69 260 clean-local:
Chris@69 261 -( cd doc && $(MAKE) $(AM_MAKEFLAGS) clean )
Chris@69 262
Chris@69 263 uninstall-local:
Chris@69 264 ( cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall )
Chris@69 265
Chris@69 266
Chris@69 267 # We check this every time make is run, with configure.ac being touched to
Chris@69 268 # trigger an update of the build system files if update_version changes the
Chris@69 269 # current PACKAGE_VERSION (or if package_version was modified manually by a
Chris@69 270 # user with either AUTO_UPDATE=no or no update_version script present - the
Chris@69 271 # latter being the normal case for tarball releases).
Chris@69 272 #
Chris@69 273 # We can't just add the package_version file to CONFIGURE_DEPENDENCIES since
Chris@69 274 # simply running autoconf will not actually regenerate configure for us when
Chris@69 275 # the content of that file changes (due to autoconf dependency checking not
Chris@69 276 # knowing about that without us creating yet another file for it to include).
Chris@69 277 #
Chris@69 278 # The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for
Chris@69 279 # makes that don't support it. The only loss of functionality is not forcing
Chris@69 280 # an update of package_version for `make dist` if AUTO_UPDATE=no, but that is
Chris@69 281 # unlikely to be a real problem for any real user.
Chris@69 282 $(top_srcdir)/configure.ac: force
Chris@69 283 @case "$(MAKECMDGOALS)" in \
Chris@69 284 dist-hook) exit 0 ;; \
Chris@69 285 dist-* | dist | distcheck | distclean) _arg=release ;; \
Chris@69 286 esac; \
Chris@69 287 if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \
Chris@69 288 if [ ! -e $(top_srcdir)/package_version ]; then \
Chris@69 289 echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \
Chris@69 290 fi; \
Chris@69 291 . $(top_srcdir)/package_version || exit 1; \
Chris@69 292 [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \
Chris@69 293 fi; \
Chris@69 294 touch $@
Chris@69 295
Chris@69 296 force:
Chris@69 297
Chris@69 298 # Create a minimal package_version file when make dist is run.
Chris@69 299 dist-hook:
Chris@69 300 echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version
Chris@69 301
Chris@69 302
Chris@69 303 .PHONY: opus check-opus install-opus docs install-docs
Chris@69 304
Chris@69 305 # automake doesn't do dependency tracking for asm files, that I can tell
Chris@69 306 $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): celt/arm/armopts-gnu.S
Chris@69 307 $(CELT_SOURCES_ARM_ASM:%.s=%-gnu.S): $(top_srcdir)/celt/arm/arm2gnu.pl
Chris@69 308
Chris@69 309 # convert ARM asm to GNU as format
Chris@69 310 %-gnu.S: $(top_srcdir)/%.s
Chris@69 311 $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@
Chris@69 312 # For autoconf-modified sources (e.g., armopts.s)
Chris@69 313 %-gnu.S: %.s
Chris@69 314 $(top_srcdir)/celt/arm/arm2gnu.pl @ARM2GNU_PARAMS@ < $< > $@
Chris@69 315
Chris@69 316 OPT_UNIT_TEST_OBJ = $(celt_tests_test_unit_mathops_SOURCES:.c=.o) \
Chris@69 317 $(celt_tests_test_unit_rotation_SOURCES:.c=.o) \
Chris@69 318 $(celt_tests_test_unit_mdct_SOURCES:.c=.o) \
Chris@69 319 $(celt_tests_test_unit_dft_SOURCES:.c=.o) \
Chris@69 320 $(silk_tests_test_unit_LPC_inv_pred_gain_SOURCES:.c=.o)
Chris@69 321
Chris@69 322 if HAVE_SSE
Chris@69 323 SSE_OBJ = $(CELT_SOURCES_SSE:.c=.lo)
Chris@69 324 $(SSE_OBJ): CFLAGS += $(OPUS_X86_SSE_CFLAGS)
Chris@69 325 endif
Chris@69 326
Chris@69 327 if HAVE_SSE2
Chris@69 328 SSE2_OBJ = $(CELT_SOURCES_SSE2:.c=.lo)
Chris@69 329 $(SSE2_OBJ): CFLAGS += $(OPUS_X86_SSE2_CFLAGS)
Chris@69 330 endif
Chris@69 331
Chris@69 332 if HAVE_SSE4_1
Chris@69 333 SSE4_1_OBJ = $(CELT_SOURCES_SSE4_1:.c=.lo) \
Chris@69 334 $(SILK_SOURCES_SSE4_1:.c=.lo) \
Chris@69 335 $(SILK_SOURCES_FIXED_SSE4_1:.c=.lo)
Chris@69 336 $(SSE4_1_OBJ): CFLAGS += $(OPUS_X86_SSE4_1_CFLAGS)
Chris@69 337 endif
Chris@69 338
Chris@69 339 if HAVE_ARM_NEON_INTR
Chris@69 340 ARM_NEON_INTR_OBJ = $(CELT_SOURCES_ARM_NEON_INTR:.c=.lo) \
Chris@69 341 $(SILK_SOURCES_ARM_NEON_INTR:.c=.lo) \
Chris@69 342 $(SILK_SOURCES_FIXED_ARM_NEON_INTR:.c=.lo)
Chris@69 343 $(ARM_NEON_INTR_OBJ): CFLAGS += \
Chris@69 344 $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS)
Chris@69 345 endif