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