cannam@154: ACLOCAL_AMFLAGS = -I m4 cannam@154: cannam@154: AM_CFLAGS = -I$(top_srcdir)/include $(DEPS_CFLAGS) cannam@154: cannam@154: dist_doc_DATA = COPYING AUTHORS README.md cannam@154: cannam@154: opusincludedir = ${includedir}/opus cannam@154: opusinclude_HEADERS = include/opusfile.h cannam@154: cannam@154: lib_LTLIBRARIES = libopusfile.la libopusurl.la cannam@154: libopusfile_la_SOURCES = \ cannam@154: src/info.c \ cannam@154: src/internal.c src/internal.h \ cannam@154: src/opusfile.c src/stream.c cannam@154: libopusfile_la_LIBADD = $(DEPS_LIBS) $(lrintf_lib) cannam@154: libopusfile_la_LDFLAGS = -no-undefined \ cannam@154: -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@ cannam@154: cannam@154: libopusurl_la_SOURCES = src/http.c src/internal.c src/internal.h cannam@154: libopusurl_la_CFLAGS = $(AM_CFLAGS) $(URL_DEPS_CFLAGS) cannam@154: libopusurl_la_LIBADD = libopusfile.la $(URL_DEPS_LIBS) cannam@154: libopusurl_la_LDFLAGS = -no-undefined \ cannam@154: -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@ cannam@154: cannam@154: if OP_ENABLE_EXAMPLES cannam@154: noinst_PROGRAMS = examples/opusfile_example examples/seeking_example cannam@154: endif cannam@154: cannam@154: examples_opusfile_example_SOURCES = examples/opusfile_example.c cannam@154: examples_seeking_example_SOURCES = examples/seeking_example.c cannam@154: examples_opusfile_example_LDADD = libopusurl.la libopusfile.la cannam@154: examples_seeking_example_LDADD = libopusurl.la libopusfile.la cannam@154: cannam@154: if OP_WIN32 cannam@154: if OP_ENABLE_HTTP cannam@154: libopusurl_la_SOURCES += src/wincerts.c src/winerrno.h cannam@154: libopusurl_la_LIBADD += -lws2_32 -lcrypt32 cannam@154: endif cannam@154: examples_opusfile_example_SOURCES += examples/win32utf8.c examples/win32utf8.h cannam@154: examples_seeking_example_SOURCES += examples/win32utf8.c examples/win32utf8.h cannam@154: endif cannam@154: cannam@154: pkgconfigdir = $(libdir)/pkgconfig cannam@154: pkgconfig_DATA = opusfile.pc opusurl.pc cannam@154: cannam@154: debug: cannam@154: $(MAKE) CFLAGS="${CFLAGS} -O0 -ggdb -DOP_ENABLE_ASSERTIONS" all cannam@154: cannam@154: EXTRA_DIST = \ cannam@154: opusfile.pc.in \ cannam@154: opusurl.pc.in \ cannam@154: opusfile-uninstalled.pc.in \ cannam@154: opusurl-uninstalled.pc.in \ cannam@154: doc/Doxyfile.in \ cannam@154: doc/opus_logo.svg \ cannam@154: doc/Makefile \ cannam@154: unix/Makefile \ cannam@154: win32/VS2015/opusfile.sln \ cannam@154: win32/VS2015/opusfile.vcxproj \ cannam@154: win32/VS2015/opusfile.vcxproj.filters \ cannam@154: win32/VS2015/opusfile_example.vcxproj \ cannam@154: win32/VS2015/opusfile_example.vcxproj.filters \ cannam@154: win32/VS2015/seeking_example.vcxproj \ cannam@154: win32/VS2015/seeking_example.vcxproj.filters cannam@154: cannam@154: # Targets to build and install just the library without the docs cannam@154: opusfile install-opusfile: NO_DOXYGEN = 1 cannam@154: cannam@154: opusfile: all cannam@154: install-opusfile: install cannam@154: cannam@154: # Or just the docs cannam@154: docs: doc/doxygen-build.stamp cannam@154: cannam@154: install-docs: cannam@154: @if [ -z "$(NO_DOXYGEN)" ]; then \ cannam@154: ( cd doc && \ cannam@154: echo "Installing documentation in $(DESTDIR)$(docdir)"; \ cannam@154: $(INSTALL) -d $(DESTDIR)$(docdir)/html/search; \ cannam@154: for f in `find html -type f \! -name "installdox"` ; do \ cannam@154: $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \ cannam@154: done ) \ cannam@154: fi cannam@154: cannam@154: doc/doxygen-build.stamp: doc/Doxyfile $(top_srcdir)/doc/opus_logo.svg \ cannam@154: $(top_srcdir)/include/*.h cannam@154: @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && doxygen && touch $(@F) ) cannam@154: cannam@154: cannam@154: if HAVE_DOXYGEN cannam@154: cannam@154: # Or everything (by default) cannam@154: all-local: docs cannam@154: cannam@154: install-data-local: install-docs cannam@154: cannam@154: clean-local: cannam@154: $(RM) -r doc/html cannam@154: $(RM) -r doc/latex cannam@154: $(RM) doc/doxygen-build.stamp cannam@154: cannam@154: uninstall-local: cannam@154: $(RM) -r $(DESTDIR)$(docdir)/html cannam@154: cannam@154: endif cannam@154: cannam@154: # We check this every time make is run, with configure.ac being touched to cannam@154: # trigger an update of the build system files if update_version changes the cannam@154: # current PACKAGE_VERSION (or if package_version was modified manually by a cannam@154: # user with either AUTO_UPDATE=no or no update_version script present - the cannam@154: # latter being the normal case for tarball releases). cannam@154: # cannam@154: # We can't just add the package_version file to CONFIGURE_DEPENDENCIES since cannam@154: # simply running autoconf will not actually regenerate configure for us when cannam@154: # the content of that file changes (due to autoconf dependency checking not cannam@154: # knowing about that without us creating yet another file for it to include). cannam@154: # cannam@154: # The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for cannam@154: # makes that don't support it. The only loss of functionality is not forcing cannam@154: # an update of package_version for `make dist` if AUTO_UPDATE=no, but that is cannam@154: # unlikely to be a real problem for any real user. cannam@154: $(top_srcdir)/configure.ac: force cannam@154: @case "$(MAKECMDGOALS)" in \ cannam@154: dist-hook) exit 0 ;; \ cannam@154: dist-* | dist | distcheck | distclean) _arg=release ;; \ cannam@154: esac; \ cannam@154: if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \ cannam@154: if [ ! -e $(top_srcdir)/package_version ]; then \ cannam@154: echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \ cannam@154: fi; \ cannam@154: . $(top_srcdir)/package_version || exit 1; \ cannam@154: [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \ cannam@154: fi; \ cannam@154: touch $@ cannam@154: cannam@154: force: cannam@154: cannam@154: # Create a minimal package_version file when make dist is run. cannam@154: dist-hook: cannam@154: echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version cannam@154: cannam@154: cannam@154: .PHONY: opusfile install-opusfile docs install-docs