initial version
authorJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 19 Jan 2001 22:39:39 +0000 (22:39 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 19 Jan 2001 22:39:39 +0000 (22:39 +0000)
Makefile.am [new file with mode: 0644]
configure.in [new file with mode: 0644]
src/Makefile.am [new file with mode: 0644]
src/flac/Makefile.am [new file with mode: 0644]
src/libFLAC/Makefile.am [new file with mode: 0644]
src/plugin_xmms/Makefile.am [new file with mode: 0644]
src/test_streams/Makefile.am [new file with mode: 0644]
src/test_unit/Makefile.am [new file with mode: 0644]
test/Makefile.am [new file with mode: 0644]

diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..05526d2
--- /dev/null
@@ -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 (file)
index 0000000..0a020a0
--- /dev/null
@@ -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 (file)
index 0000000..a5cdb97
--- /dev/null
@@ -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 (file)
index 0000000..cf2b1f6
--- /dev/null
@@ -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 (file)
index 0000000..50bceae
--- /dev/null
@@ -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 (file)
index 0000000..b6bbf45
--- /dev/null
@@ -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 (file)
index 0000000..8080d3b
--- /dev/null
@@ -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 (file)
index 0000000..3b7dd6b
--- /dev/null
@@ -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 (file)
index 0000000..1c9d416
--- /dev/null
@@ -0,0 +1,4 @@
+TESTS = ./test_unit.sh ./test_streams.sh
+
+CLEANFILES = $(wildcard *.raw) $(wildcard *.flac) $(wildcard *.cmp) \
+       $(wildcard *.log)