Builds the analysis files more cleanly than #including C files
[opus.git] / Makefile.am
1 AUTOMAKE_OPTIONS = subdir-objects
2
3 lib_LTLIBRARIES = libopus.la
4
5 DIST_SUBDIRS = doc
6
7 INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
8
9 include celt_sources.mk
10 include silk_sources.mk
11 include opus_sources.mk
12
13 if FIXED_POINT
14 SILK_SOURCES += $(SILK_SOURCES_FIXED)
15 else
16 SILK_SOURCES += $(SILK_SOURCES_FLOAT)
17 OPUS_SOURCES += $(OPUS_SOURCES_FLOAT)
18 endif
19
20 libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
21
22 pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h
23
24 noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
25
26 noinst_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
27
28 TESTS = 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
29
30 opus_demo_SOURCES = src/opus_demo.c
31
32 opus_demo_LDADD = libopus.la -lm
33
34 repacketizer_demo_SOURCES = src/repacketizer_demo.c
35
36 repacketizer_demo_LDADD = libopus.la -lm
37
38 opus_compare_SOURCES = src/opus_compare.c
39 opus_compare_LDADD = -lm
40
41 tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
42 tests_test_opus_api_LDADD = libopus.la -lm
43
44 tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h
45 tests_test_opus_encode_LDADD = libopus.la -lm
46
47 tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
48 tests_test_opus_decode_LDADD = libopus.la -lm
49
50 celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
51 celt_tests_test_unit_cwrs32_LDADD = -lm
52
53 celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
54 celt_tests_test_unit_dft_LDADD = -lm
55
56 celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
57 celt_tests_test_unit_entropy_LDADD = -lm
58
59 celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
60 celt_tests_test_unit_laplace_LDADD = -lm
61
62 celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
63 celt_tests_test_unit_mathops_LDADD = -lm
64
65 celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
66 celt_tests_test_unit_mdct_LDADD = -lm
67
68 celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
69 celt_tests_test_unit_rotation_LDADD = -lm
70
71 celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
72 celt_tests_test_unit_types_LDADD = -lm
73
74 if CUSTOM_MODES
75 pkginclude_HEADERS += include/opus_custom.h
76 noinst_PROGRAMS += opus_custom_demo
77 opus_custom_demo_SOURCES = celt/opus_custom_demo.c
78 opus_custom_demo_LDADD = libopus.la -lm
79 endif
80
81 EXTRA_DIST = opus.pc.in opus-uninstalled.pc.in
82
83 pkgconfigdir = $(libdir)/pkgconfig
84 pkgconfig_DATA = opus.pc
85
86
87 # Targets to build and install just the library without the docs
88 opus check-opus install-opus: export NO_DOXYGEN = 1
89
90 opus: all
91 check-opus: check
92 install-opus: install
93
94
95 # Or just the docs
96 docs:
97         $(MAKE) $(AM_MAKEFLAGS) -C doc
98
99 install-docs:
100         $(MAKE) $(AM_MAKEFLAGS) -C doc install
101
102
103 # Or everything (by default)
104 all-local:
105         @[ -n "$(NO_DOXYGEN)" ] || $(MAKE) $(AM_MAKEFLAGS) -C doc
106
107 install-data-local:
108         @[ -n "$(NO_DOXYGEN)" ] || $(MAKE) $(AM_MAKEFLAGS) -C doc install
109
110 clean-local:
111         -$(MAKE) $(AM_MAKEFLAGS) -C doc clean
112
113 uninstall-local:
114         $(MAKE) $(AM_MAKEFLAGS) -C doc uninstall
115
116
117 .PHONY: opus check-opus install-opus docs install-docs