blob: 6f51f51a3c86248c9dccf767b04c9307a50fbb86 [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
Jean-Marc Valin4923f3f2011-10-26 21:36:57 -04005INCLUDES = -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 -04006
Jean-Marc Valin8e4f5a82011-04-30 00:35:55 -04007include celt_sources.mk
8include silk_sources.mk
9include opus_sources.mk
Jean-Marc Valine7a2a032011-02-14 21:18:08 -050010
Jean-Marc Valinb2c00d22011-08-02 08:13:42 -040011if FIXED_POINT
12SILK_SOURCES += $(SILK_SOURCES_FIXED)
13else
14SILK_SOURCES += $(SILK_SOURCES_FLOAT)
15endif
16
Ralph Gilescd539df2012-04-05 09:23:47 -070017include celt_headers.mk
18include silk_headers.mk
19include opus_headers.mk
Jean-Marc Valin3596fed2011-07-09 09:20:51 -040020
Jean-Marc Valin8e4f5a82011-04-30 00:35:55 -040021libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040022
Jean-Marc Valin4923f3f2011-10-26 21:36:57 -040023pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h
Jean-Marc Valine05aaf22011-04-29 19:48:42 -040024
Jean-Marc Valin3596fed2011-07-09 09:20:51 -040025noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
26
Gregory Maxwell9652f812011-10-26 23:55:33 -040027noinst_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 -040028
Gregory Maxwell9652f812011-10-26 23:55:33 -040029TESTS = 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 -040030
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040031opus_demo_SOURCES = src/opus_demo.c
32
33opus_demo_LDADD = libopus.la -lm
Jean-Marc Valine8dbcb82011-08-10 09:47:30 -040034
Gregory Maxwell38805f32011-10-26 20:05:56 -040035repacketizer_demo_SOURCES = src/repacketizer_demo.c
Jean-Marc Valine8dbcb82011-08-10 09:47:30 -040036
Gregory Maxwell38805f32011-10-26 20:05:56 -040037repacketizer_demo_LDADD = libopus.la -lm
Ralph Giles9f713092011-08-28 22:32:13 +120038
Jean-Marc Valinc4ca21f2011-09-15 10:10:40 -070039opus_compare_SOURCES = src/opus_compare.c
40opus_compare_LDADD = -lm
41
Gregory Maxwell9652f812011-10-26 23:55:33 -040042tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
43tests_test_opus_api_LDADD = libopus.la -lm
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040044
Gregory Maxwell9652f812011-10-26 23:55:33 -040045tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h
46tests_test_opus_encode_LDADD = libopus.la -lm
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040047
Gregory Maxwell9652f812011-10-26 23:55:33 -040048tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
49tests_test_opus_decode_LDADD = libopus.la -lm
50
51celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
52celt_tests_test_unit_cwrs32_LDADD = -lm
53
54celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
55celt_tests_test_unit_dft_LDADD = -lm
56
57celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
58celt_tests_test_unit_entropy_LDADD = -lm
59
60celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
61celt_tests_test_unit_laplace_LDADD = -lm
62
63celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
64celt_tests_test_unit_mathops_LDADD = -lm
65
66celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
67celt_tests_test_unit_mdct_LDADD = -lm
68
69celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
70celt_tests_test_unit_rotation_LDADD = -lm
71
72celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
73celt_tests_test_unit_types_LDADD = -lm
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040074
Jean-Marc Valin06237d72011-09-01 13:20:40 -040075if CUSTOM_MODES
Jean-Marc Valin4923f3f2011-10-26 21:36:57 -040076pkginclude_HEADERS += include/opus_custom.h
Gregory Maxwella5ff49e2011-10-26 19:56:00 -040077noinst_PROGRAMS += opus_custom_demo
78opus_custom_demo_SOURCES = celt/opus_custom_demo.c
79opus_custom_demo_LDADD = libopus.la -lm
Jean-Marc Valin06237d72011-09-01 13:20:40 -040080endif
81
Ronb6512b42012-05-21 23:16:39 +093082EXTRA_DIST = opus.pc.in opus-uninstalled.pc.in doc
Ralph Giles9f713092011-08-28 22:32:13 +120083
84pkgconfigdir = $(libdir)/pkgconfig
85pkgconfig_DATA = opus.pc
Ronb6512b42012-05-21 23:16:39 +093086
87
88# Targets to build and install just the library without the docs
89opus check-opus install-opus: export NO_DOXYGEN = 1
90
91opus: all
92check-opus: check
93install-opus: install
94
95
96# Or just the docs
97docs:
98 $(MAKE) $(AM_MAKEFLAGS) -C doc
99
100install-docs:
101 $(MAKE) $(AM_MAKEFLAGS) -C doc install
102
103
104# Or everything (by default)
105all-local:
106 @[ -n "$(NO_DOXYGEN)" ] || $(MAKE) $(AM_MAKEFLAGS) -C doc
107
108install-data-local:
109 @[ -n "$(NO_DOXYGEN)" ] || $(MAKE) $(AM_MAKEFLAGS) -C doc install
110
111clean-local:
112 $(MAKE) $(AM_MAKEFLAGS) -C doc clean
113
114distclean-local:
115 $(MAKE) $(AM_MAKEFLAGS) -C doc distclean
116
117uninstall-local:
118 $(MAKE) $(AM_MAKEFLAGS) -C doc uninstall
119
120
121.PHONY: opus check-opus install-opus docs install-docs