Fix warnings when compiling with a recent MSVC.
[opusfile.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 AM_CFLAGS = -I$(top_srcdir)/include $(DEPS_CFLAGS)
4
5 dist_doc_DATA = COPYING AUTHORS README.txt
6
7 opusincludedir = ${includedir}/opus
8 opusinclude_HEADERS = include/opusfile.h
9
10 lib_LTLIBRARIES = libopusfile.la
11 libopusfile_la_SOURCES = \
12         src/http.c src/info.c \
13         src/internal.c src/internal.h \
14         src/opusfile.c src/stream.c
15 libopusfile_la_LIBADD = $(DEPS_LIBS)
16 libopusfile_la_LDFLAGS = -no-undefined \
17  -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@
18 if OP_ENABLE_HTTP
19 if OP_WIN32
20 libopusfile_la_LIBADD += -lws2_32
21 endif
22 endif
23
24 noinst_PROGRAMS = examples/opusfile_example examples/seeking_example
25
26 examples_opusfile_example_LDADD = libopusfile.la
27 examples_seeking_example_LDADD = libopusfile.la
28
29 debug:
30         $(MAKE) CFLAGS="${CFLAGS} -O0 -ggdb -DOP_ENABLE_ASSERTIONS" all
31
32 pkgconfigdir = $(libdir)/pkgconfig
33 pkgconfig_DATA = opusfile.pc
34
35 EXTRA_DIST = \
36  opusfile.pc.in \
37  opusfile-uninstalled.pc.in \
38  doc/Doxyfile.in \
39  doc/git-version.sh \
40  doc/opus_logo.svg \
41  doc/Makefile \
42  unix/Makefile
43
44 # Targets to build and install just the library without the docs
45 opusfile install-opusfile: NO_DOXYGEN = 1
46
47 opusfile: all
48 install-opusfile: install
49
50 # Or just the docs
51 docs: doc/doxygen-build.stamp
52
53 install-docs:
54         @if [ -z "$(NO_DOXYGEN)" ]; then \
55           ( cd doc && \
56             echo "Installing documentation in $(DESTDIR)$(docdir)"; \
57             for f in `find html -type f \! -name "installdox"` ; do \
58               $(INSTALL) -d $(DESTDIR)$(docdir)/html/search;   \
59               $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f;     \
60             done ) \
61         fi
62
63 doc/doxygen-build.stamp: doc/Doxyfile $(top_srcdir)/doc/opus_logo.svg \
64                          $(top_srcdir)/include/*.h
65         @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && doxygen && touch $(@F) )
66
67
68 if HAVE_DOXYGEN
69
70 # Or everything (by default)
71 all-local: docs
72
73 install-data-local: install-docs
74
75 clean-local:
76         $(RM) -r doc/html
77         $(RM) -r doc/latex
78         $(RM) doc/doxygen-build.stamp
79
80 uninstall-local:
81         $(RM) -r $(DESTDIR)$(docdir)/html
82
83 endif
84
85 .PHONY: opusfile install-opusfile docs install-docs