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