blob: db37d99817b4766fd964b38c95909eafc98df11e [file] [log] [blame]
Gregory Maxwell135e5d32012-04-29 20:24:36 -04001AUTOMAKE_OPTIONS = subdir-objects
Ralph Giles2852cb12011-08-02 11:43:43 -07002
Jean-Marc Valine05aaf22011-04-29 19:48:42 -04003lib_LTLIBRARIES = libopus.la
Jean-Marc Valina0cbeca2010-07-08 11:27:20 -04004
Ron9a89d562012-06-12 04:40:42 +09305DIST_SUBDIRS = doc
6
Jean-Marc Valin4923f3f2011-10-26 21:36:57 -04007INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
Jean-Marc Valina0cbeca2010-07-08 11:27:20 -04008
Jean-Marc Valin8e4f5a82011-04-30 00:35:55 -04009include celt_sources.mk
10include silk_sources.mk
11include opus_sources.mk
Jean-Marc Valine7a2a032011-02-14 21:18:08 -050012
Jean-Marc Valinb2c00d22011-08-02 08:13:42 -040013if FIXED_POINT
14SILK_SOURCES += $(SILK_SOURCES_FIXED)
15else
16SILK_SOURCES += $(SILK_SOURCES_FLOAT)
17endif
18
Ralph Gilescd539df2012-04-05 09:23:47 -070019include celt_headers.mk
20include silk_headers.mk
21include opus_headers.mk
Jean-Marc Valin3596fed2011-07-09 09:20:51 -040022
Jean-Marc Valin8e4f5a82011-04-30 00:35:55 -040023libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
Gregory Maxwell8d2e9ad2012-08-10 17:21:28 -040024libopus_la_LDFLAGS = -no-undefined -version-info @OPUS_LT_CURRENT@:@OPUS_LT_REVISION@:@OPUS_LT_AGE@
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040025
Jean-Marc Valin4923f3f2011-10-26 21:36:57 -040026pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040027
Jean-Marc Valin3596fed2011-07-09 09:20:51 -040028noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
29
Gregory Maxwell9652f812011-10-26 23:55:33 -040030noinst_PROGRAMS = opus_demo repacketizer_demo opus_compare tests/test_opus_api tests/test_opus_encode tests/test_opus_decode celt/tests/test_unit_cwrs32 celt/tests/test_unit_dft celt/tests/test_unit_entropy celt/tests/test_unit_laplace celt/tests/test_unit_mathops celt/tests/test_unit_mdct celt/tests/test_unit_rotation celt/tests/test_unit_types
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040031
Gregory Maxwell9652f812011-10-26 23:55:33 -040032TESTS = celt/tests/test_unit_types celt/tests/test_unit_mathops celt/tests/test_unit_entropy celt/tests/test_unit_laplace celt/tests/test_unit_dft celt/tests/test_unit_mdct celt/tests/test_unit_rotation celt/tests/test_unit_cwrs32 tests/test_opus_api tests/test_opus_decode tests/test_opus_encode
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040033
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040034opus_demo_SOURCES = src/opus_demo.c
35
36opus_demo_LDADD = libopus.la -lm
Jean-Marc Valine8dbcb82011-08-10 09:47:30 -040037
Gregory Maxwell38805f32011-10-26 20:05:56 -040038repacketizer_demo_SOURCES = src/repacketizer_demo.c
Jean-Marc Valine8dbcb82011-08-10 09:47:30 -040039
Gregory Maxwell38805f32011-10-26 20:05:56 -040040repacketizer_demo_LDADD = libopus.la -lm
Ralph Giles9f713092011-08-28 22:32:13 +120041
Jean-Marc Valinc4ca21f2011-09-15 10:10:40 -070042opus_compare_SOURCES = src/opus_compare.c
43opus_compare_LDADD = -lm
44
Gregory Maxwell9652f812011-10-26 23:55:33 -040045tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
46tests_test_opus_api_LDADD = libopus.la -lm
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040047
Gregory Maxwell9652f812011-10-26 23:55:33 -040048tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h
49tests_test_opus_encode_LDADD = libopus.la -lm
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040050
Gregory Maxwell9652f812011-10-26 23:55:33 -040051tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
52tests_test_opus_decode_LDADD = libopus.la -lm
53
54celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
55celt_tests_test_unit_cwrs32_LDADD = -lm
56
57celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
58celt_tests_test_unit_dft_LDADD = -lm
59
60celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
61celt_tests_test_unit_entropy_LDADD = -lm
62
63celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
64celt_tests_test_unit_laplace_LDADD = -lm
65
66celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
67celt_tests_test_unit_mathops_LDADD = -lm
68
69celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
70celt_tests_test_unit_mdct_LDADD = -lm
71
72celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
73celt_tests_test_unit_rotation_LDADD = -lm
74
75celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
76celt_tests_test_unit_types_LDADD = -lm
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040077
Jean-Marc Valin06237d72011-09-01 13:20:40 -040078if CUSTOM_MODES
Jean-Marc Valin4923f3f2011-10-26 21:36:57 -040079pkginclude_HEADERS += include/opus_custom.h
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040080noinst_PROGRAMS += opus_custom_demo
81opus_custom_demo_SOURCES = celt/opus_custom_demo.c
82opus_custom_demo_LDADD = libopus.la -lm
Jean-Marc Valin06237d72011-09-01 13:20:40 -040083endif
84
Ralph Giles59c5a822012-08-16 11:39:56 -070085EXTRA_DIST = version.mk \
86 opus.pc.in \
Gregory Maxwelle852c342012-08-09 07:29:58 -040087 opus-uninstalled.pc.in \
Gregory Maxwell6e2dd162012-08-30 12:26:34 -040088 opus.m4 \
Jean-Marc Valine91dfa02012-08-31 23:10:12 -040089 Makefile.unix \
Gregory Maxwell1b58bc72012-08-19 16:45:20 -040090 tests/run_vectors.sh \
Gregory Maxwelle852c342012-08-09 07:29:58 -040091 opus.sln \
92 celt/celt.vcxproj \
93 celt/celt.vcxproj.filters \
94 src/opus_demo.vcxproj \
95 src/opus.vcxproj \
96 src/opus.vcxproj.filters \
97 src/opus_demo.vcxproj.filters \
98 tests/test_opus_decode.vcxproj.filters \
99 tests/test_opus_decode.vcxproj \
100 tests/test_opus_encode.vcxproj.filters \
101 tests/test_opus_encode.vcxproj \
102 tests/test_opus_api.vcxproj.filters \
103 tests/test_opus_api.vcxproj \
104 silk/float/silk_float.vcxproj.filters \
105 silk/float/silk_float.vcxproj \
106 silk/fixed/silk_fixed.vcxproj.filters \
107 silk/fixed/silk_fixed.vcxproj \
108 silk/silk_common.vcxproj \
109 silk/silk_common.vcxproj.filters \
110 win32/genversion.bat \
111 win32/config.h
Ralph Giles9f713092011-08-28 22:32:13 +1200112
113pkgconfigdir = $(libdir)/pkgconfig
114pkgconfig_DATA = opus.pc
Ronb6512b42012-05-21 23:16:39 +0930115
Gregory Maxwell6e2dd162012-08-30 12:26:34 -0400116m4datadir = $(datadir)/aclocal
117m4data_DATA = opus.m4
Ronb6512b42012-05-21 23:16:39 +0930118
119# Targets to build and install just the library without the docs
120opus check-opus install-opus: export NO_DOXYGEN = 1
121
122opus: all
123check-opus: check
124install-opus: install
125
126
127# Or just the docs
128docs:
Gregory Maxwell5467ce72012-08-29 10:31:16 -0400129 cd doc && $(MAKE) $(AM_MAKEFLAGS)
Ronb6512b42012-05-21 23:16:39 +0930130
131install-docs:
Gregory Maxwell5467ce72012-08-29 10:31:16 -0400132 cd doc && $(MAKE) $(AM_MAKEFLAGS) install
Ronb6512b42012-05-21 23:16:39 +0930133
134
135# Or everything (by default)
136all-local:
Gregory Maxwell5467ce72012-08-29 10:31:16 -0400137 @[ -n "$(NO_DOXYGEN)" ] || cd doc && $(MAKE) $(AM_MAKEFLAGS)
Ronb6512b42012-05-21 23:16:39 +0930138
139install-data-local:
Gregory Maxwell5467ce72012-08-29 10:31:16 -0400140 @[ -n "$(NO_DOXYGEN)" ] || cd doc && $(MAKE) $(AM_MAKEFLAGS) install
Ronb6512b42012-05-21 23:16:39 +0930141
142clean-local:
Gregory Maxwell5467ce72012-08-29 10:31:16 -0400143 -cd doc && $(MAKE) $(AM_MAKEFLAGS) clean
Ronb6512b42012-05-21 23:16:39 +0930144
145uninstall-local:
Gregory Maxwell5467ce72012-08-29 10:31:16 -0400146 cd doc && $(MAKE) $(AM_MAKEFLAGS) uninstall
Ronb6512b42012-05-21 23:16:39 +0930147
148
149.PHONY: opus check-opus install-opus docs install-docs