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