ref: c99874886185de0ecf53d0ce5a1a64d4173116f8
parent: 23a160b80578e67fb996d8c29e8021f00f37cd2d
author: David Seifert <soap@gentoo.org>
date: Tue Jun 13 05:24:06 EDT 2017
Make build system completely non-recursive
--- a/.gitignore
+++ b/.gitignore
@@ -47,8 +47,9 @@
src/config.h
src/config.h.in
stamp-h1
+.dirstamp
tests/*_test
tests/benchmark
tests/src-evaluate
-tests/*.log
-tests/*.trs
+*.log
+*.trs
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,20 +2,138 @@
DISTCHECK_CONFIGURE_FLAGS = --enable-werror
-SUBDIRS = src doc examples tests
-DIST_SUBDIRS = Win32 $(SUBDIRS)
+AM_CPPFLAGS = -I$(top_srcdir)/src $(OS_SPECIFIC_INCLUDES)
-EXTRA_DIST = autogen.sh libsamplerate.spec.in samplerate.pc.in Make.bat
+EXTRA_DIST = autogen.sh libsamplerate.spec.in samplerate.pc.in Make.bat Win32
pkgconfig_DATA = samplerate.pc
-m4datadir = $(datadir)/aclocal
-
# Some people prefer "make test" to "make check".
-
test:
- make check
+ $(MAKE) check
-check-asm :
- (cd src && make check-asm)
+########
+# src/ #
+########
+lib_LTLIBRARIES = src/libsamplerate.la
+include_HEADERS = src/samplerate.h
+
+EXTRA_DIST += src/config.h.in src/Version_script.in src/check_asm.sh
+CLEANFILES = src/src_sinc.s
+
+# MinGW requires -no-undefined if a DLL is to be built.
+src_libsamplerate_la_LDFLAGS = -no-undefined -version-info $(SHARED_VERSION_INFO) $(SHLIB_VERSION_ARG)
+src_libsamplerate_la_SOURCES = src/samplerate.c src/src_sinc.c src/src_zoh.c src/src_linear.c \
+ src/common.h src/float_cast.h src/fastest_coeffs.h src/mid_qual_coeffs.h src/high_qual_coeffs.h
+
+#-------------------------------------------------------------------------------
+# An extra check for bad asm.
+
+check-asm: src/check_asm.sh src/src_sinc.s src/src_linear.s src/src_zoh.s
+ @echo
+ @echo
+ $(top_srcdir)/src/check_asm.sh src/src_sinc.s
+ $(top_srcdir)/src/check_asm.sh src/src_linear.s
+ $(top_srcdir)/src/check_asm.sh src/src_zoh.s
+ @echo
+ @echo
+
+.c.s:
+ $(CC) -S $(CFLAGS) $(CPPFLAGS) $(DEFAULT_INCLUDES) $< -o $@
+
+# Disable autoheader.
+AUTOHEADER=echo
+
+########
+# doc/ #
+########
+
+dist_html_DATA = doc/SRC.png doc/SRC.css doc/index.html doc/license.html doc/history.html \
+ doc/download.html doc/lists.html doc/quality.html doc/win32.html doc/faq.html doc/api.html \
+ doc/api_simple.html doc/api_callback.html doc/api_full.html doc/api_misc.html
+
+#############
+# examples/ #
+#############
+
+check_PROGRAMS = examples/varispeed-play examples/timewarp-file
+
+examples_varispeed_play_SOURCES = examples/varispeed-play.c examples/audio_out.c examples/audio_out.h
+examples_varispeed_play_CFLAGS = $(SNDFILE_CFLAGS) $(ALSA_CFLAGS)
+examples_varispeed_play_LDADD = src/libsamplerate.la $(SNDFILE_LIBS) $(ALSA_LIBS) $(OS_SPECIFIC_LINKS)
+
+examples_timewarp_file_SOURCES = examples/timewarp-file.c
+examples_timewarp_file_CFLAGS = $(SNDFILE_CFLAGS) $(ALSA_CFLAGS)
+examples_timewarp_file_LDADD = src/libsamplerate.la $(SNDFILE_LIBS) $(ALSA_LIBS)
+
+if HAVE_LIBSNDFILE
+bin_PROGRAMS = examples/sndfile-resample
+examples_sndfile_resample_SOURCES = examples/sndfile-resample.c
+examples_sndfile_resample_CFLAGS = $(SNDFILE_CFLAGS) $(ALSA_CFLAGS)
+examples_sndfile_resample_LDADD = src/libsamplerate.la $(SNDFILE_LIBS) $(ALSA_LIBS)
+endif
+
+##########
+# tests/ #
+##########
+
+check_PROGRAMS += tests/misc_test tests/termination_test tests/simple_test tests/callback_test \
+ tests/reset_test tests/multi_channel_test tests/snr_bw_test tests/float_short_test \
+ tests/varispeed_test tests/callback_hang_test tests/src-evaluate tests/throughput_test \
+ tests/multichan_throughput_test tests/downsample_test
+TESTS = tests/misc_test tests/termination_test tests/callback_hang_test tests/downsample_test \
+ tests/simple_test tests/callback_test tests/reset_test tests/multi_channel_test \
+ tests/varispeed_test tests/float_short_test tests/snr_bw_test tests/throughput_test
+
+#===============================================================================
+
+tests_misc_test_SOURCES = tests/misc_test.c tests/util.c tests/util.h
+tests_misc_test_LDADD = src/libsamplerate.la
+
+tests_termination_test_SOURCES = tests/termination_test.c tests/util.c tests/util.h
+tests_termination_test_LDADD = src/libsamplerate.la
+
+tests_callback_hang_test_SOURCES = tests/callback_hang_test.c tests/util.c tests/util.h
+tests_callback_hang_test_LDADD = src/libsamplerate.la
+
+tests_simple_test_SOURCES = tests/simple_test.c tests/util.c tests/util.h
+tests_simple_test_LDADD = src/libsamplerate.la
+
+tests_reset_test_SOURCES = tests/reset_test.c tests/util.c tests/util.h
+tests_reset_test_LDADD = src/libsamplerate.la
+
+tests_multi_channel_test_SOURCES = tests/multi_channel_test.c tests/util.c tests/calc_snr.c
+tests_multi_channel_test_CFLAGS = $(FFTW3_CFLAGS)
+tests_multi_channel_test_LDADD = src/libsamplerate.la $(FFTW3_LIBS)
+
+tests_snr_bw_test_SOURCES = tests/snr_bw_test.c tests/calc_snr.c tests/util.c tests/util.h
+tests_snr_bw_test_CFLAGS = $(FFTW3_CFLAGS)
+tests_snr_bw_test_LDADD = src/libsamplerate.la $(FFTW3_LIBS)
+
+tests_callback_test_SOURCES = tests/callback_test.c tests/util.c tests/util.h
+tests_callback_test_LDADD = src/libsamplerate.la
+
+tests_float_short_test_SOURCES = tests/float_short_test.c tests/util.c tests/util.h
+tests_float_short_test_LDADD = src/libsamplerate.la
+
+tests_downsample_test_SOURCES = tests/downsample_test.c tests/util.c tests/util.h
+tests_downsample_test_LDADD = src/libsamplerate.la
+
+tests_varispeed_test_SOURCES = tests/varispeed_test.c tests/util.c tests/util.h tests/calc_snr.c
+tests_varispeed_test_CFLAGS = $(FFTW3_CFLAGS)
+tests_varispeed_test_LDADD = src/libsamplerate.la $(FFTW3_LIBS)
+
+# This program is for evaluating other sample rate converters.
+
+tests_throughput_test_SOURCES = tests/throughput_test.c tests/util.c tests/calc_snr.c
+tests_throughput_test_CFLAGS = $(FFTW3_CFLAGS)
+tests_throughput_test_LDADD = src/libsamplerate.la $(FFTW3_LIBS)
+
+tests_multichan_throughput_test_SOURCES = tests/multichan_throughput_test.c tests/util.c tests/calc_snr.c
+tests_multichan_throughput_test_CFLAGS = $(FFTW3_CFLAGS)
+tests_multichan_throughput_test_LDADD = src/libsamplerate.la $(FFTW3_LIBS)
+
+tests_src_evaluate_SOURCES = tests/src-evaluate.c tests/calc_snr.c tests/util.c
+tests_src_evaluate_CFLAGS = $(SNDFILE_CFLAGS) $(FFTW3_CFLAGS)
+tests_src_evaluate_LDADD = $(SNDFILE_LIBS) $(FFTW3_LIBS)
--- a/Win32/Makefile.am
+++ /dev/null
@@ -1,2 +1,0 @@
-EXTRA_DIST = Makefile.msvc config.h unistd.h unistd.h libsamplerate-0.def
-
--- a/configure.ac
+++ b/configure.ac
@@ -251,7 +251,7 @@
temp_CFLAGS=`echo $CFLAGS | sed "s/-Wall//"`
CFLAGS=$temp_CFLAGS],
[linux*|kfreebsd*-gnu*|gnu*], [
- SHLIB_VERSION_ARG="-Wl,--version-script=Version_script"
+ SHLIB_VERSION_ARG="-Wl,--version-script=\$(top_builddir)/src/Version_script"
])
])
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,3 +1,0 @@
-dist_html_DATA = SRC.png SRC.css index.html license.html history.html download.html \
- lists.html quality.html win32.html faq.html api.html \
- api_simple.html api_callback.html api_full.html api_misc.html
--- a/examples/Makefile.am
+++ /dev/null
@@ -1,26 +1,0 @@
-# This file was automatically generated
-# DO NOT EDIT!
-
-if HAVE_LIBSNDFILE
-bin_PROGRAMS = sndfile-resample
-endif
-
-check_PROGRAMS = varispeed-play timewarp-file
-
-SAMPLERATEDIR =../src
-AM_CPPFLAGS = -I$(srcdir)/$(SAMPLERATEDIR) $(OS_SPECIFIC_INCLUDES)
-AM_CFLAGS = $(SNDFILE_CFLAGS)
-
-#===============================================================================
-
-if HAVE_LIBSNDFILE
-sndfile_resample_SOURCES = sndfile-resample.c
-sndfile_resample_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS) $(ALSA_LIBS)
-endif
-
-varispeed_play_SOURCES = varispeed-play.c audio_out.c audio_out.h
-varispeed_play_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS) $(ALSA_LIBS) $(OS_SPECIFIC_LINKS)
-
-timewarp_file_SOURCES = timewarp-file.c
-timewarp_file_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS) $(ALSA_LIBS)
-
--- a/src/Makefile.am
+++ /dev/null
@@ -1,39 +1,0 @@
-# This file was automatically generated from the Makefile.am
-# DO NOT EDIT!
-
-lib_LTLIBRARIES = libsamplerate.la
-include_HEADERS = samplerate.h
-
-EXTRA_DIST = config.h.in Version_script.in check_asm.sh
-CLEANFILES = src_sinc.s
-
-COEFF_HDRS = fastest_coeffs.h mid_qual_coeffs.h high_qual_coeffs.h
-
-
-noinst_HEADERS = common.h float_cast.h $(COEFF_HDRS)
-
-SRC_SOURCES = samplerate.c src_sinc.c $(COEFF_HDRS) src_zoh.c src_linear.c
-
-# MinGW requires -no-undefined if a DLL is to be built.
-libsamplerate_la_LDFLAGS = -no-undefined -version-info $(SHARED_VERSION_INFO) $(SHLIB_VERSION_ARG)
-libsamplerate_la_SOURCES = $(SRC_SOURCES) $(noinst_HEADERS)
-libsamplerate_la_LIBADD = -lm
-
-#-------------------------------------------------------------------------------
-# An extra check for bad asm.
-
-check-asm : check_asm.sh src_sinc.s src_linear.s src_zoh.s
- @echo
- @echo
- $(srcdir)/check_asm.sh src_sinc.s
- $(srcdir)/check_asm.sh src_linear.s
- $(srcdir)/check_asm.sh src_zoh.s
- @echo
- @echo
-
-.c.s:
- $(CC) -S $(CFLAGS) $(CPPFLAGS) $(DEFAULT_INCLUDES) $< -o $@
-
-# Disable autoheader.
-AUTOHEADER=echo
-
--- a/tests/Makefile.am
+++ /dev/null
@@ -1,75 +1,0 @@
-check_PROGRAMS = misc_test termination_test simple_test callback_test \
- reset_test multi_channel_test snr_bw_test \
- float_short_test varispeed_test callback_hang_test \
- src-evaluate throughput_test multichan_throughput_test \
- downsample_test
-TESTS = \
- misc_test \
- termination_test \
- callback_hang_test \
- downsample_test \
- simple_test \
- callback_test \
- reset_test \
- multi_channel_test \
- varispeed_test \
- float_short_test \
- snr_bw_test \
- throughput_test
-
-SAMPLRATEDIR =../src
-AM_CPPFLAGS = -I$(srcdir)/$(SAMPLRATEDIR)
-noinst_HEADERS = util.h
-
-#===============================================================================
-
-misc_test_SOURCES = misc_test.c util.c util.h
-misc_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
-
-termination_test_SOURCES = termination_test.c util.c util.h
-termination_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
-
-callback_hang_test_SOURCES = callback_hang_test.c util.c util.h
-callback_hang_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
-
-simple_test_SOURCES = simple_test.c util.c util.h
-simple_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
-
-reset_test_SOURCES = reset_test.c util.c util.h
-reset_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
-
-multi_channel_test_SOURCES = multi_channel_test.c util.c calc_snr.c
-multi_channel_test_CFLAGS = $(FFTW3_CFLAGS)
-multi_channel_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
-
-snr_bw_test_SOURCES = snr_bw_test.c calc_snr.c util.c util.h
-snr_bw_test_CFLAGS = $(FFTW3_CFLAGS)
-snr_bw_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
-
-callback_test_SOURCES = callback_test.c util.c util.h
-callback_test_CFLAGS = $(FFTW3_CFLAGS)
-callback_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
-
-float_short_test_SOURCES = float_short_test.c util.c util.h
-float_short_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
-
-downsample_test_SOURCES = downsample_test.c util.c util.h
-downsample_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
-
-varispeed_test_SOURCES = varispeed_test.c util.c util.h calc_snr.c
-varispeed_test_CFLAGS = $(FFTW3_CFLAGS)
-varispeed_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
-
-# This program is for evaluating other sample rate converters.
-
-throughput_test_CFLAGS = $(AM_CFLAGS) $(FFTW3_CFLAGS)
-throughput_test_SOURCES = throughput_test.c util.c calc_snr.c
-throughput_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
-
-multichan_throughput_test_CFLAGS = $(AM_CFLAGS) $(FFTW3_CFLAGS)
-multichan_throughput_test_SOURCES = multichan_throughput_test.c util.c calc_snr.c
-multichan_throughput_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
-
-src_evaluate_SOURCES = src-evaluate.c calc_snr.c util.c
-src_evaluate_CFLAGS = $(SNDFILE_CFLAGS) $(FFTW3_CFLAGS)
-src_evaluate_LDADD = $(SNDFILE_LIBS) $(FFTW3_LIBS)