annotate src/opus-1.3/Makefile.am @ 169:223a55898ab9 tip default

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