Fixed sizeof param in silk_get_TOC. Size for memset was calculated wrong.
[opus.git] / Makefile.am
index 612498e..3607e52 100644 (file)
@@ -2,9 +2,9 @@ AUTOMAKE_OPTIONS = subdir-objects
 
 lib_LTLIBRARIES = libopus.la
 
-SUBDIRS = . libcelt/tests doc
+DIST_SUBDIRS = doc
 
-INCLUDES = -I$(top_srcdir)/libcelt -I$(top_srcdir)/silk -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
 
 include celt_sources.mk
 include silk_sources.mk
@@ -16,34 +16,105 @@ else
 SILK_SOURCES += $(SILK_SOURCES_FLOAT)
 endif
 
-include celt_headers.txt
-include silk_headers.txt
-include opus_headers.txt
+include celt_headers.mk
+include silk_headers.mk
+include opus_headers.mk
 
 libopus_la_SOURCES = $(CELT_SOURCES) $(SILK_SOURCES) $(OPUS_SOURCES)
 
-pkginclude_HEADERS = src/opus.h src/opus_multistream.h libcelt/opus_types.h libcelt/opus_defines.h
+pkginclude_HEADERS = include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h
 
 noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD)
 
-noinst_PROGRAMS = test_opus test_repacketizer
+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
 
-test_opus_SOURCES = src/test_opus.c
+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
 
-test_opus_LDADD = libopus.la -lm
+opus_demo_SOURCES = src/opus_demo.c
 
-test_repacketizer_SOURCES = src/test_repacketizer.c
+opus_demo_LDADD = libopus.la -lm
 
-test_repacketizer_LDADD = libopus.la -lm
+repacketizer_demo_SOURCES = src/repacketizer_demo.c
+
+repacketizer_demo_LDADD = libopus.la -lm
+
+opus_compare_SOURCES = src/opus_compare.c
+opus_compare_LDADD = -lm
+
+tests_test_opus_api_SOURCES = tests/test_opus_api.c tests/test_opus_common.h
+tests_test_opus_api_LDADD = libopus.la -lm
+
+tests_test_opus_encode_SOURCES = tests/test_opus_encode.c tests/test_opus_common.h
+tests_test_opus_encode_LDADD = libopus.la -lm
+
+tests_test_opus_decode_SOURCES = tests/test_opus_decode.c tests/test_opus_common.h
+tests_test_opus_decode_LDADD = libopus.la -lm
+
+celt_tests_test_unit_cwrs32_SOURCES = celt/tests/test_unit_cwrs32.c
+celt_tests_test_unit_cwrs32_LDADD = -lm
+
+celt_tests_test_unit_dft_SOURCES = celt/tests/test_unit_dft.c
+celt_tests_test_unit_dft_LDADD = -lm
+
+celt_tests_test_unit_entropy_SOURCES = celt/tests/test_unit_entropy.c
+celt_tests_test_unit_entropy_LDADD = -lm
+
+celt_tests_test_unit_laplace_SOURCES = celt/tests/test_unit_laplace.c
+celt_tests_test_unit_laplace_LDADD = -lm
+
+celt_tests_test_unit_mathops_SOURCES = celt/tests/test_unit_mathops.c
+celt_tests_test_unit_mathops_LDADD = -lm
+
+celt_tests_test_unit_mdct_SOURCES = celt/tests/test_unit_mdct.c
+celt_tests_test_unit_mdct_LDADD = -lm
+
+celt_tests_test_unit_rotation_SOURCES = celt/tests/test_unit_rotation.c
+celt_tests_test_unit_rotation_LDADD = -lm
+
+celt_tests_test_unit_types_SOURCES = celt/tests/test_unit_types.c
+celt_tests_test_unit_types_LDADD = -lm
 
 if CUSTOM_MODES
-pkginclude_HEADERS += libcelt/opus_custom.h
-noinst_PROGRAMS += test_opus_custom
-test_opus_custom_SOURCES = libcelt/test_opus_custom.c
-test_opus_custom_LDADD = libopus.la -lm
+pkginclude_HEADERS += include/opus_custom.h
+noinst_PROGRAMS += opus_custom_demo
+opus_custom_demo_SOURCES = celt/opus_custom_demo.c
+opus_custom_demo_LDADD = libopus.la -lm
 endif
 
 EXTRA_DIST = opus.pc.in opus-uninstalled.pc.in
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = opus.pc
+
+
+# Targets to build and install just the library without the docs
+opus check-opus install-opus: export NO_DOXYGEN = 1
+
+opus: all
+check-opus: check
+install-opus: install
+
+
+# Or just the docs
+docs:
+       $(MAKE) $(AM_MAKEFLAGS) -C doc
+
+install-docs:
+       $(MAKE) $(AM_MAKEFLAGS) -C doc install
+
+
+# Or everything (by default)
+all-local:
+       @[ -n "$(NO_DOXYGEN)" ] || $(MAKE) $(AM_MAKEFLAGS) -C doc
+
+install-data-local:
+       @[ -n "$(NO_DOXYGEN)" ] || $(MAKE) $(AM_MAKEFLAGS) -C doc install
+
+clean-local:
+       -$(MAKE) $(AM_MAKEFLAGS) -C doc clean
+
+uninstall-local:
+       $(MAKE) $(AM_MAKEFLAGS) -C doc uninstall
+
+
+.PHONY: opus check-opus install-opus docs install-docs