annotate src/opusfile-0.9/Makefile.am @ 169:223a55898ab9 tip default

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