Jean-Marc Valin | 5b0673f | 2017-08-16 20:59:14 -0400 | [diff] [blame] | 1 | ACLOCAL_AMFLAGS = -I m4 |
| 2 | |
| 3 | AM_CFLAGS = -I$(top_srcdir)/include $(DEPS_CFLAGS) |
| 4 | |
| 5 | dist_doc_DATA = COPYING AUTHORS README |
| 6 | |
| 7 | include_HEADERS = include/rnnoise.h |
| 8 | |
| 9 | lib_LTLIBRARIES = librnnoise.la |
| 10 | noinst_HEADERS = src/arch.h \ |
| 11 | src/celt_lpc.h \ |
| 12 | src/common.h \ |
| 13 | src/_kiss_fft_guts.h \ |
| 14 | src/kiss_fft.h \ |
| 15 | src/opus_types.h \ |
| 16 | src/pitch.h \ |
| 17 | src/rnn_data.h \ |
| 18 | src/rnn.h \ |
Jean-Marc Valin | 5b0673f | 2017-08-16 20:59:14 -0400 | [diff] [blame] | 19 | src/tansig_table.h |
| 20 | |
| 21 | librnnoise_la_SOURCES = \ |
| 22 | src/denoise.c \ |
| 23 | src/rnn.c \ |
| 24 | src/rnn_data.c \ |
Gregor Richards | 5e7af83 | 2018-09-20 21:51:38 -0400 | [diff] [blame] | 25 | src/rnn_reader.c \ |
Jean-Marc Valin | 5b0673f | 2017-08-16 20:59:14 -0400 | [diff] [blame] | 26 | src/pitch.c \ |
| 27 | src/kiss_fft.c \ |
| 28 | src/celt_lpc.c |
| 29 | |
| 30 | librnnoise_la_LIBADD = $(DEPS_LIBS) $(lrintf_lib) $(LIBM) |
| 31 | librnnoise_la_LDFLAGS = -no-undefined \ |
| 32 | -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@ |
| 33 | |
| 34 | if OP_ENABLE_EXAMPLES |
| 35 | noinst_PROGRAMS = examples/rnnoise_demo |
| 36 | endif |
| 37 | |
| 38 | examples_rnnoise_demo_SOURCES = examples/rnnoise_demo.c |
| 39 | examples_rnnoise_demo_LDADD = librnnoise.la |
| 40 | |
| 41 | pkgconfigdir = $(libdir)/pkgconfig |
| 42 | pkgconfig_DATA = rnnoise.pc |
| 43 | |
| 44 | debug: |
| 45 | $(MAKE) CFLAGS="${CFLAGS} -O0 -ggdb -DOP_ENABLE_ASSERTIONS" all |
| 46 | |
| 47 | EXTRA_DIST = \ |
| 48 | rnnoise.pc.in \ |
| 49 | rnnoise-uninstalled.pc.in \ |
| 50 | doc/Doxyfile.in \ |
| 51 | doc/Makefile |
| 52 | |
| 53 | # Targets to build and install just the library without the docs |
| 54 | librnnoise install-librnnoise: NO_DOXYGEN = 1 |
| 55 | |
| 56 | rnnoise: all |
| 57 | install-rnnoise: install |
| 58 | |
| 59 | # Or just the docs |
| 60 | docs: doc/doxygen-build.stamp |
| 61 | |
| 62 | install-docs: |
| 63 | @if [ -z "$(NO_DOXYGEN)" ]; then \ |
| 64 | ( cd doc && \ |
| 65 | echo "Installing documentation in $(DESTDIR)$(docdir)"; \ |
| 66 | $(INSTALL) -d $(DESTDIR)$(docdir)/html/search; \ |
| 67 | for f in `find html -type f \! -name "installdox"` ; do \ |
| 68 | $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \ |
| 69 | done ) \ |
| 70 | fi |
| 71 | |
| 72 | doc/doxygen-build.stamp: doc/Doxyfile \ |
| 73 | $(top_srcdir)/include/*.h |
| 74 | @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && doxygen && touch $(@F) ) |
| 75 | |
| 76 | |
| 77 | if HAVE_DOXYGEN |
| 78 | |
| 79 | # Or everything (by default) |
| 80 | all-local: docs |
| 81 | |
| 82 | install-data-local: install-docs |
| 83 | |
| 84 | clean-local: |
| 85 | $(RM) -r doc/html |
| 86 | $(RM) -r doc/latex |
| 87 | $(RM) doc/doxygen-build.stamp |
| 88 | |
| 89 | uninstall-local: |
| 90 | $(RM) -r $(DESTDIR)$(docdir)/html |
| 91 | |
| 92 | endif |
| 93 | |
| 94 | # We check this every time make is run, with configure.ac being touched to |
| 95 | # trigger an update of the build system files if update_version changes the |
| 96 | # current PACKAGE_VERSION (or if package_version was modified manually by a |
| 97 | # user with either AUTO_UPDATE=no or no update_version script present - the |
| 98 | # latter being the normal case for tarball releases). |
| 99 | # |
| 100 | # We can't just add the package_version file to CONFIGURE_DEPENDENCIES since |
| 101 | # simply running autoconf will not actually regenerate configure for us when |
| 102 | # the content of that file changes (due to autoconf dependency checking not |
| 103 | # knowing about that without us creating yet another file for it to include). |
| 104 | # |
| 105 | # The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for |
| 106 | # makes that don't support it. The only loss of functionality is not forcing |
| 107 | # an update of package_version for `make dist` if AUTO_UPDATE=no, but that is |
| 108 | # unlikely to be a real problem for any real user. |
| 109 | $(top_srcdir)/configure.ac: force |
| 110 | @case "$(MAKECMDGOALS)" in \ |
| 111 | dist-hook) exit 0 ;; \ |
| 112 | dist-* | dist | distcheck | distclean) _arg=release ;; \ |
| 113 | esac; \ |
| 114 | if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \ |
| 115 | if [ ! -e $(top_srcdir)/package_version ]; then \ |
| 116 | echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \ |
| 117 | fi; \ |
| 118 | . $(top_srcdir)/package_version || exit 1; \ |
| 119 | [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \ |
| 120 | fi; \ |
| 121 | touch $@ |
| 122 | |
| 123 | force: |
| 124 | |
| 125 | # Create a minimal package_version file when make dist is run. |
| 126 | dist-hook: |
| 127 | echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version |
| 128 | |
| 129 | |
| 130 | .PHONY: rnnoise install-rnnoise docs install-docs |