1ACLOCAL_AMFLAGS = -I m4
2
3#AUTOMAKE_OPTIONS = subdir-objects 1.6 dist-zip
4AUTOMAKE_OPTIONS = subdir-objects 1.11 dist-zip dist-xz
5
6SUBDIRS = .
7
8AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/win32 -D_FORTIFY_SOURCE=2
9AM_CFLAGS = $(OPUS_CFLAGS) $(OGG_CFLAGS)
10
11bin_PROGRAMS = opusenc opusdec opusinfo
12noinst_PROGRAMS = opusrtp
13
14noinst_HEADERS = src/arch.h \
15                 src/diag_range.h \
16                 src/flac.h \
17                 src/info_opus.h \
18                 src/encoder.h \
19                 src/opus_header.h \
20                 src/opusinfo.h \
21                 src/picture.h \
22                 src/resample_sse.h \
23                 src/speex_resampler.h \
24                 src/stack_alloc.h \
25                 win32/unicode_support.h \
26                 src/cpusupport.h \
27                 src/wave_out.h \
28                 src/wav_io.h
29
30EXTRA_DIST = Makefile.unix \
31             man/opusrtp.1 \
32             include/getopt.h \
33             share/getopt.c \
34             share/getopt1.c \
35             win32/genversion.bat \
36             win32/config.h \
37             win32/unicode_support.h \
38             win32/unicode_support.c \
39             win32/VS2015/generate_version.vcxproj \
40             win32/VS2015/opusdec.vcxproj \
41             win32/VS2015/opusdec.vcxproj.filters \
42             win32/VS2015/opusenc.vcxproj \
43             win32/VS2015/opusenc.vcxproj.filters \
44             win32/VS2015/opusinfo.vcxproj \
45             win32/VS2015/opusinfo.vcxproj.filters \
46             win32/VS2015/opus-tools.sln \
47             win32/VS2015/common.props \
48             win32/VS2015/opus-tools.props
49
50dist_man_MANS = man/opusenc.1 man/opusdec.1 man/opusinfo.1
51
52resampler_CPPFLAGS = -DRANDOM_PREFIX=opustools -DOUTSIDE_SPEEX -DRESAMPLE_FULL_SINC_TABLE
53
54opusenc_SOURCES = src/opus_header.c src/opusenc.c src/picture.c src/audio-in.c src/diag_range.c src/flac.c win32/unicode_support.c
55opusenc_CPPFLAGS = $(AM_CPPFLAGS)
56opusenc_CFLAGS = $(AM_CFLAGS) $(LIBOPUSENC_CFLAGS) $(FLAC_CFLAGS)
57opusenc_LDADD = $(LIBOPUSENC_LIBS) $(OPUS_LIBS) $(FLAC_LIBS) $(OGG_LIBS) $(LIBM)
58opusenc_MANS = man/opusenc.1
59
60opusdec_SOURCES = src/opus_header.c src/wav_io.c src/wave_out.c src/opusdec.c src/resample.c src/diag_range.c win32/unicode_support.c
61opusdec_CPPFLAGS = $(AM_CPPFLAGS) $(resampler_CPPFLAGS)
62opusdec_CFLAGS = $(AM_CFLAGS) $(OPUSURL_CFLAGS)
63opusdec_LDADD = $(OPUSURL_LIBS) $(OPUS_LIBS) $(LIBM)
64opusdec_MANS = man/opusdec.1
65
66opusinfo_SOURCES = src/opus_header.c src/opusinfo.c src/info_opus.c src/picture.c win32/unicode_support.c
67opusinfo_CPPFLAGS = $(AM_CPPFLAGS) -DOPUSTOOLS
68opusinfo_LDADD = $(OGG_LIBS)
69opusinfo_MANS = man/opusinfo.1
70
71opusrtp_SOURCES = src/opusrtp.c
72opusrtp_LDADD = $(OPUS_LIBS) $(OGG_LIBS) $(OPUSRTP_LIBS)
73
74#TESTS = FIXME
75
76
77# We check this every time make is run, with configure.ac being touched to
78# trigger an update of the build system files if update_version changes the
79# current PACKAGE_VERSION (or if package_version was modified manually by a
80# user with either AUTO_UPDATE=no or no update_version script present - the
81# latter being the normal case for tarball releases).
82#
83# We can't just add the package_version file to CONFIGURE_DEPENDENCIES since
84# simply running autoconf will not actually regenerate configure for us when
85# the content of that file changes (due to autoconf dependency checking not
86# knowing about that without us creating yet another file for it to include).
87#
88# The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for
89# makes that don't support it.  The only loss of functionality is not forcing
90# an update of package_version for `make dist` if AUTO_UPDATE=no, but that is
91# unlikely to be a real problem for any real user.
92$(top_srcdir)/configure.ac: force
93	@case "$(MAKECMDGOALS)" in \
94	    dist-hook)                             exit 0       ;; \
95	    dist-* | dist | distcheck | distclean) _arg=release ;; \
96	esac; \
97	if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \
98	    if [ ! -e $(top_srcdir)/package_version ]; then \
99		echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \
100	    fi; \
101	    . $(top_srcdir)/package_version || exit 1; \
102	    [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \
103	fi; \
104	touch $@
105
106force:
107
108# Create a minimal package_version file when make dist is run.
109dist-hook:
110	echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version
111
112