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