annotate src/opusfile-0.9/Makefile.am @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents 7aeed7906520
children
rev   line source
Chris@69 1 ACLOCAL_AMFLAGS = -I m4
Chris@69 2
Chris@69 3 AM_CFLAGS = -I$(top_srcdir)/include $(DEPS_CFLAGS)
Chris@69 4
Chris@69 5 dist_doc_DATA = COPYING AUTHORS README.md
Chris@69 6
Chris@69 7 opusincludedir = ${includedir}/opus
Chris@69 8 opusinclude_HEADERS = include/opusfile.h
Chris@69 9
Chris@69 10 lib_LTLIBRARIES = libopusfile.la libopusurl.la
Chris@69 11 libopusfile_la_SOURCES = \
Chris@69 12 src/info.c \
Chris@69 13 src/internal.c src/internal.h \
Chris@69 14 src/opusfile.c src/stream.c
Chris@69 15 libopusfile_la_LIBADD = $(DEPS_LIBS) $(lrintf_lib)
Chris@69 16 libopusfile_la_LDFLAGS = -no-undefined \
Chris@69 17 -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@
Chris@69 18
Chris@69 19 libopusurl_la_SOURCES = src/http.c src/internal.c src/internal.h
Chris@69 20 libopusurl_la_CFLAGS = $(AM_CFLAGS) $(URL_DEPS_CFLAGS)
Chris@69 21 libopusurl_la_LIBADD = libopusfile.la $(URL_DEPS_LIBS)
Chris@69 22 libopusurl_la_LDFLAGS = -no-undefined \
Chris@69 23 -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@
Chris@69 24
Chris@69 25 if OP_ENABLE_EXAMPLES
Chris@69 26 noinst_PROGRAMS = examples/opusfile_example examples/seeking_example
Chris@69 27 endif
Chris@69 28
Chris@69 29 examples_opusfile_example_SOURCES = examples/opusfile_example.c
Chris@69 30 examples_seeking_example_SOURCES = examples/seeking_example.c
Chris@69 31 examples_opusfile_example_LDADD = libopusurl.la libopusfile.la
Chris@69 32 examples_seeking_example_LDADD = libopusurl.la libopusfile.la
Chris@69 33
Chris@69 34 if OP_WIN32
Chris@69 35 if OP_ENABLE_HTTP
Chris@69 36 libopusurl_la_SOURCES += src/wincerts.c src/winerrno.h
Chris@69 37 libopusurl_la_LIBADD += -lws2_32 -lcrypt32
Chris@69 38 endif
Chris@69 39 examples_opusfile_example_SOURCES += examples/win32utf8.c examples/win32utf8.h
Chris@69 40 examples_seeking_example_SOURCES += examples/win32utf8.c examples/win32utf8.h
Chris@69 41 endif
Chris@69 42
Chris@69 43 pkgconfigdir = $(libdir)/pkgconfig
Chris@69 44 pkgconfig_DATA = opusfile.pc opusurl.pc
Chris@69 45
Chris@69 46 debug:
Chris@69 47 $(MAKE) CFLAGS="${CFLAGS} -O0 -ggdb -DOP_ENABLE_ASSERTIONS" all
Chris@69 48
Chris@69 49 EXTRA_DIST = \
Chris@69 50 opusfile.pc.in \
Chris@69 51 opusurl.pc.in \
Chris@69 52 opusfile-uninstalled.pc.in \
Chris@69 53 opusurl-uninstalled.pc.in \
Chris@69 54 doc/Doxyfile.in \
Chris@69 55 doc/opus_logo.svg \
Chris@69 56 doc/Makefile \
Chris@69 57 unix/Makefile \
Chris@69 58 win32/VS2015/opusfile.sln \
Chris@69 59 win32/VS2015/opusfile.vcxproj \
Chris@69 60 win32/VS2015/opusfile.vcxproj.filters \
Chris@69 61 win32/VS2015/opusfile_example.vcxproj \
Chris@69 62 win32/VS2015/opusfile_example.vcxproj.filters \
Chris@69 63 win32/VS2015/seeking_example.vcxproj \
Chris@69 64 win32/VS2015/seeking_example.vcxproj.filters
Chris@69 65
Chris@69 66 # Targets to build and install just the library without the docs
Chris@69 67 opusfile install-opusfile: NO_DOXYGEN = 1
Chris@69 68
Chris@69 69 opusfile: all
Chris@69 70 install-opusfile: install
Chris@69 71
Chris@69 72 # Or just the docs
Chris@69 73 docs: doc/doxygen-build.stamp
Chris@69 74
Chris@69 75 install-docs:
Chris@69 76 @if [ -z "$(NO_DOXYGEN)" ]; then \
Chris@69 77 ( cd doc && \
Chris@69 78 echo "Installing documentation in $(DESTDIR)$(docdir)"; \
Chris@69 79 $(INSTALL) -d $(DESTDIR)$(docdir)/html/search; \
Chris@69 80 for f in `find html -type f \! -name "installdox"` ; do \
Chris@69 81 $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \
Chris@69 82 done ) \
Chris@69 83 fi
Chris@69 84
Chris@69 85 doc/doxygen-build.stamp: doc/Doxyfile $(top_srcdir)/doc/opus_logo.svg \
Chris@69 86 $(top_srcdir)/include/*.h
Chris@69 87 @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && doxygen && touch $(@F) )
Chris@69 88
Chris@69 89
Chris@69 90 if HAVE_DOXYGEN
Chris@69 91
Chris@69 92 # Or everything (by default)
Chris@69 93 all-local: docs
Chris@69 94
Chris@69 95 install-data-local: install-docs
Chris@69 96
Chris@69 97 clean-local:
Chris@69 98 $(RM) -r doc/html
Chris@69 99 $(RM) -r doc/latex
Chris@69 100 $(RM) doc/doxygen-build.stamp
Chris@69 101
Chris@69 102 uninstall-local:
Chris@69 103 $(RM) -r $(DESTDIR)$(docdir)/html
Chris@69 104
Chris@69 105 endif
Chris@69 106
Chris@69 107 # We check this every time make is run, with configure.ac being touched to
Chris@69 108 # trigger an update of the build system files if update_version changes the
Chris@69 109 # current PACKAGE_VERSION (or if package_version was modified manually by a
Chris@69 110 # user with either AUTO_UPDATE=no or no update_version script present - the
Chris@69 111 # latter being the normal case for tarball releases).
Chris@69 112 #
Chris@69 113 # We can't just add the package_version file to CONFIGURE_DEPENDENCIES since
Chris@69 114 # simply running autoconf will not actually regenerate configure for us when
Chris@69 115 # the content of that file changes (due to autoconf dependency checking not
Chris@69 116 # knowing about that without us creating yet another file for it to include).
Chris@69 117 #
Chris@69 118 # The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for
Chris@69 119 # makes that don't support it. The only loss of functionality is not forcing
Chris@69 120 # an update of package_version for `make dist` if AUTO_UPDATE=no, but that is
Chris@69 121 # unlikely to be a real problem for any real user.
Chris@69 122 $(top_srcdir)/configure.ac: force
Chris@69 123 @case "$(MAKECMDGOALS)" in \
Chris@69 124 dist-hook) exit 0 ;; \
Chris@69 125 dist-* | dist | distcheck | distclean) _arg=release ;; \
Chris@69 126 esac; \
Chris@69 127 if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \
Chris@69 128 if [ ! -e $(top_srcdir)/package_version ]; then \
Chris@69 129 echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \
Chris@69 130 fi; \
Chris@69 131 . $(top_srcdir)/package_version || exit 1; \
Chris@69 132 [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \
Chris@69 133 fi; \
Chris@69 134 touch $@
Chris@69 135
Chris@69 136 force:
Chris@69 137
Chris@69 138 # Create a minimal package_version file when make dist is run.
Chris@69 139 dist-hook:
Chris@69 140 echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version
Chris@69 141
Chris@69 142
Chris@69 143 .PHONY: opusfile install-opusfile docs install-docs