From 9f429bae5aabe824654508e21af623f41086c1cd Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Fri, 19 Jan 2001 22:39:39 +0000 Subject: [PATCH] initial version --- Makefile.am | 24 ++++++++++++++++++++++ configure.in | 40 ++++++++++++++++++++++++++++++++++++ src/Makefile.am | 9 ++++++++ src/flac/Makefile.am | 9 ++++++++ src/libFLAC/Makefile.am | 22 ++++++++++++++++++++ src/plugin_xmms/Makefile.am | 13 ++++++++++++ src/test_streams/Makefile.am | 8 ++++++++ src/test_unit/Makefile.am | 9 ++++++++ test/Makefile.am | 4 ++++ 9 files changed, 138 insertions(+) create mode 100644 Makefile.am create mode 100644 configure.in create mode 100644 src/Makefile.am create mode 100644 src/flac/Makefile.am create mode 100644 src/libFLAC/Makefile.am create mode 100644 src/plugin_xmms/Makefile.am create mode 100644 src/test_streams/Makefile.am create mode 100644 src/test_unit/Makefile.am create mode 100644 test/Makefile.am diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..05526d21 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,24 @@ +# +# automake provides the following useful targets: +# +# all: build all programs and libraries using the current +# configuration (set by configure) +# +# check: build and run all self-tests +# +# clean: remove everything except what's required to build everything +# +# distclean: remove everything except what goes in the distribution +# +# The old 'debug' target is obsolete; configure the source tree with +# ./configure --enable-debug to enable debugging and self-tests +# +# The old 'release' target is obsolete; this is now the default +# + + +SUBDIRS = src test + +DISTCLEANFILES = libtool-disable-static + +AUTOMAKE_OPTIONS = foreign diff --git a/configure.in b/configure.in new file mode 100644 index 00000000..0a020a01 --- /dev/null +++ b/configure.in @@ -0,0 +1,40 @@ +AC_INIT(src/flac/main.c) +AM_INIT_AUTOMAKE(flac, 0.5) + +# We need two libtools, one that builds both shared and static, and +# one that builds only static. This is because the resulting libtool +# does not allow us to choose which to build at runtime. +AM_PROG_LIBTOOL +sed -e 's/^build_old_libs=yes/build_old_libs=no/' libtool > libtool-disable-static +chmod +x libtool-disable-static + +AC_PROG_MAKE_SET + +AC_ARG_ENABLE(debug, + [ --enable-debug Turn on debugging], + [case "${enableval}" in + yes) debug=true ;; + no) debug=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; + esac],[debug=false]) +AM_CONDITIONAL(DEBUG, test x$debug = xtrue) + +AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - xmms support will not be built])) +AM_CONDITIONAL(XMMS, test x$XMMS_INPUT_PLUGIN_DIR != x) + +CFLAGS='-I./include -I $(top_srcdir)/include -Wall -W' +if test x$debug = xtrue; then + CFLAGS="$CFLAGS -g -O0 -DDEBUG" +else + CFLAGS="$CFLAGS -O3 -DNDEBUG" +fi + +AC_OUTPUT( Makefile \ + src/Makefile \ + src/libFLAC/Makefile \ + src/flac/Makefile \ + src/plugin_xmms/Makefile \ + src/test_streams/Makefile \ + src/test_unit/Makefile \ + test/Makefile \ + ) diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 00000000..a5cdb973 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,9 @@ +if XMMS +XMMS_DIRS = plugin_xmms +endif + +if DEBUG +DEBUG_DIRS = test_streams test_unit +endif + +SUBDIRS = libFLAC flac $(XMMS_DIRS) $(DEBUG_DIRS) diff --git a/src/flac/Makefile.am b/src/flac/Makefile.am new file mode 100644 index 00000000..cf2b1f69 --- /dev/null +++ b/src/flac/Makefile.am @@ -0,0 +1,9 @@ +bin_PROGRAMS = flac +CFLAGS = @CFLAGS@ + +flac_SOURCES = \ + decode.c \ + encode.c \ + main.c +flac_LDFLAGS = -lm +flac_LDADD = $(top_builddir)/src/libFLAC/libFLAC.la diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am new file mode 100644 index 00000000..50bceaeb --- /dev/null +++ b/src/libFLAC/Makefile.am @@ -0,0 +1,22 @@ +# +# GNU makefile +# + +lib_LTLIBRARIES = libFLAC.la +if DEBUG +CFLAGS += @CFLAGS@ -DFLAC_OVERFLOW_DETECT +else +CFLAGS = @CFLAGS@ +endif + +libFLAC_la_SOURCES = \ + bitbuffer.c \ + crc.c \ + encoder.c \ + encoder_framing.c \ + file_decoder.c \ + fixed.c \ + format.c \ + lpc.c \ + md5.c \ + stream_decoder.c diff --git a/src/plugin_xmms/Makefile.am b/src/plugin_xmms/Makefile.am new file mode 100644 index 00000000..b6bbf45a --- /dev/null +++ b/src/plugin_xmms/Makefile.am @@ -0,0 +1,13 @@ +# +# GNU makefile +# + +CFLAGS = @CFLAGS@ @XMMS_CFLAGS@ +xmmsinputplugindir = @XMMS_INPUT_PLUGIN_DIR@ +# Don't build a static library +LIBTOOL = $(top_builddir)/libtool-disable-static + +xmmsinputplugin_LTLIBRARIES = libxmms-flac.la +libxmms_flac_la_SOURCES = plugin.c +libxmms_flac_la_LIBADD = -L$(top_builddir)/src/libFLAC/.libs -lFLAC @XMMS_LIBS@ +libxmms_flac_la_LDFLAGS = -module -avoid-version diff --git a/src/test_streams/Makefile.am b/src/test_streams/Makefile.am new file mode 100644 index 00000000..8080d3b9 --- /dev/null +++ b/src/test_streams/Makefile.am @@ -0,0 +1,8 @@ +CFLAGS = @CFLAGS@ + +noinst_PROGRAMS = test_streams +test_streams_SOURCES = \ + main.c +test_streams_LDFLAGS = -lm + +CLEANFILES = $(wildcard *.raw) diff --git a/src/test_unit/Makefile.am b/src/test_unit/Makefile.am new file mode 100644 index 00000000..3b7dd6b0 --- /dev/null +++ b/src/test_unit/Makefile.am @@ -0,0 +1,9 @@ +CFLAGS = @CFLAGS@ +INCLUDES = -I$(top_srcdir)/src/libFLAC/include + +noinst_PROGRAMS = test_unit +test_unit_LDFLAGS = -lm +test_unit_LDADD = $(top_builddir)/src/libFLAC/libFLAC.la +test_unit_SOURCES = \ + bitbuffer.c \ + main.c diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 00000000..1c9d4160 --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,4 @@ +TESTS = ./test_unit.sh ./test_streams.sh + +CLEANFILES = $(wildcard *.raw) $(wildcard *.flac) $(wildcard *.cmp) \ + $(wildcard *.log)