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