Commit 99602a28 authored by Josh Coalson's avatar Josh Coalson
Browse files

add support for new file_utils convenience library

parent f9a97120
......@@ -27,6 +27,9 @@ Package=<4>
Project_Dep_Name flac_ren
End Project Dependency
Begin Project Dependency
Project_Dep_Name file_utils
End Project Dependency
Begin Project Dependency
Project_Dep_Name gain_analysis
End Project Dependency
Begin Project Dependency
......@@ -74,6 +77,9 @@ Package=<5>
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name file_utils
End Project Dependency
Begin Project Dependency
Project_Dep_Name gain_analysis
End Project Dependency
......@@ -117,6 +123,18 @@ Package=<4>
###############################################################################
Project: "file_utils"=.\src\share\file_utils\file_utils.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "gain_analysis"=.\src\share\gain_analysis\gain_analysis.dsp - Package Owner=<4>
Package=<5>
......
......@@ -58,6 +58,7 @@ libOggFLAC++: libFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
share:
(cd src/$@/file_utils ; $(MAKE) -f Makefile.lite $(CONFIG))
(cd src/$@/gain_analysis ; $(MAKE) -f Makefile.lite $(CONFIG))
(cd src/$@/getopt ; $(MAKE) -f Makefile.lite $(CONFIG))
(cd src/$@/replaygain ; $(MAKE) -f Makefile.lite $(CONFIG))
......@@ -99,6 +100,7 @@ clean:
-(cd src/libFLAC++ ; $(MAKE) -f Makefile.lite clean)
-(cd src/libOggFLAC ; $(MAKE) -f Makefile.lite clean)
-(cd src/libOggFLAC++ ; $(MAKE) -f Makefile.lite clean)
-(cd src/share/file_utils ; $(MAKE) -f Makefile.lite clean)
-(cd src/share/gain_analysis ; $(MAKE) -f Makefile.lite clean)
-(cd src/share/getopt ; $(MAKE) -f Makefile.lite clean)
-(cd src/share/replaygain ; $(MAKE) -f Makefile.lite clean)
......
......@@ -230,7 +230,7 @@ fi
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(FLaC__HAS_XMMS, test x$XMMS_INPUT_PLUGIN_DIR != x)
SHARE_LIBS='$(top_builddir)/src/share/libreplaygain.a $(top_builddir)/src/share/libgain_analysis.a $(top_builddir)/src/share/libgetopt.a $(top_builddir)/src/share/libutf8.a'
SHARE_LIBS='$(top_builddir)/src/share/libreplaygain.a $(top_builddir)/src/share/libgain_analysis.a $(top_builddir)/src/share/libgetopt.a $(top_builddir)/src/share/libutf8.a $(top_builddir)/src/share/libfile_utils.a'
dnl check for i18n(internationalization); these are from libiconv/gettext
AM_ICONV
......@@ -382,6 +382,7 @@ AC_OUTPUT( \
src/plugin_winamp3/Makefile \
src/plugin_xmms/Makefile \
src/share/Makefile \
src/share/file_utils/Makefile \
src/share/gain_analysis/Makefile \
src/share/getopt/Makefile \
src/share/replaygain/Makefile \
......
......@@ -3,6 +3,7 @@
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = \
file_utils.h \
gain_analysis.h \
getopt.h \
utf8.h
......@@ -24,16 +24,16 @@ topdir = ../..
PROGRAM_NAME = flac
ifeq ($(DARWIN_BUILD),yes)
INCLUDES = -I./include -I$(topdir)/include
LIBS = -lreplaygain -lFLAC -lgain_analysis -lgetopt -lutf8 -lc -lm
LIBS = -lreplaygain -lFLAC -lgain_analysis -lgetopt -lutf8 -lfile_utils -lc -lm
else
#@@@ TODO: conditionalize ogg includes, defines, and -logg
ifeq ($(SOLARIS_BUILD),yes)
INCLUDES = -I./include -I$(topdir)/include -I$(HOME)/local/include -DFLAC__HAS_OGG
LIBS = -lreplaygain -lOggFLAC -lFLAC -lgain_analysis -lgetopt -lutf8 -lm -L$(HOME)/local/lib -logg
LIBS = -lreplaygain -lOggFLAC -lFLAC -lgain_analysis -lgetopt -lutf8 -lfile_utils -lm -L$(HOME)/local/lib -logg
else
#@@@ TODO: conditionalize ogg includes, defines, and -logg
INCLUDES = -I./include -I$(topdir)/include -I$(HOME)/local/include -DFLAC__HAS_OGG
LIBS = -lreplaygain -lOggFLAC -lFLAC -lgain_analysis -lgetopt -lutf8 -lm -L$(HOME)/local/lib -logg
LIBS = -lreplaygain -lOggFLAC -lFLAC -lgain_analysis -lgetopt -lutf8 -lfile_utils -lm -L$(HOME)/local/lib -logg
endif
endif
......@@ -41,7 +41,6 @@ OBJS = \
analyze.o \
decode.o \
encode.o \
file.o \
main.o \
vorbiscomment.o
......
......@@ -31,7 +31,6 @@ C_FILES= \
analyze.c \
decode.c \
encode.c \
file.c \
main.c \
vorbiscomment.c
......@@ -40,7 +39,7 @@ OBJS= $(C_FILES:.c=.obj)
all: flac.exe
flac.exe: $(OBJS)
link.exe /libpath:"..\..\obj\lib" -out:../../obj/bin/$*.exe $(OBJS) replaygain.lib libOggFLAC.lib libFLAC.lib ogg_static.lib gain_analysis.lib getopt.lib utf8.lib
link.exe /libpath:"..\..\obj\lib" -out:../../obj/bin/$*.exe $(OBJS) replaygain.lib libOggFLAC.lib libFLAC.lib ogg_static.lib gain_analysis.lib getopt.lib utf8.lib file_utils.lib
clean:
-del *.obj *.pch
......
......@@ -30,8 +30,8 @@
#include <stdio.h> /* for FILE et al. */
#include <string.h> /* for strcmp() */
#include "FLAC/all.h"
#include "share/file_utils.h"
#include "decode.h"
#include "file.h"
#ifdef FLAC__HAS_OGG
#include "OggFLAC/stream_decoder.h"
......@@ -206,7 +206,7 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__
d->aopts = aopts;
d->skip = skip;
d->inbasefilename = flac__file_get_basename(infilename);
d->inbasefilename = FLAC__file_utils_get_basename(infilename);
d->outfilename = outfilename;
d->samples_processed = 0;
......@@ -229,7 +229,7 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__
if(!d->test_only) {
if(0 == strcmp(outfilename, "-")) {
d->fout = file__get_binary_stdout();
d->fout = FLAC__file_utils_get_binary_stdout();
}
else {
if(0 == (d->fout = fopen(outfilename, "wb"))) {
......@@ -243,7 +243,7 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__
#ifdef FLAC__HAS_OGG
if(d->is_ogg) {
if (0 == strcmp(infilename, "-")) {
d->fin = file__get_binary_stdin();
d->fin = FLAC__file_utils_get_binary_stdin();
} else {
if (0 == (d->fin = fopen(infilename, "rb"))) {
fprintf(stderr, "%s: ERROR: can't open input file %s\n", d->inbasefilename, infilename);
......
......@@ -23,7 +23,7 @@ topdir = ../..
PROGRAM_NAME = metaflac
INCLUDES = -I./include -I$(topdir)/include
LIBS = -lreplaygain -lFLAC -lgain_analysis -lgetopt -lutf8 -lm
LIBS = -lreplaygain -lFLAC -lgain_analysis -lgetopt -lutf8 -lfile_utils -lm
OBJS = \
main.o
......
......@@ -33,7 +33,7 @@ OBJS= $(C_FILES:.c=.obj)
all: metaflac.exe
metaflac.exe: $(OBJS)
link.exe /libpath:"..\..\obj\lib" -out:../../obj/bin/$*.exe $(OBJS) replaygain.lib libFLAC.lib gain_analysis.lib getopt.lib utf8.lib
link.exe /libpath:"..\..\obj\lib" -out:../../obj/bin/$*.exe $(OBJS) replaygain.lib libFLAC.lib gain_analysis.lib getopt.lib utf8.lib file_utils.lib
clean:
-del *.obj *.pch
......
......@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
SUBDIRS = gain_analysis getopt replaygain utf8
SUBDIRS = file_utils gain_analysis getopt replaygain utf8
EXTRA_DIST = \
Makefile.vc \
......
......@@ -3,6 +3,9 @@
# It's less hassle to spell it all out that to figure out how to do it right with nmake:
all:
cd file_utils
nmake /f Makefile.vc
cd ..
cd gain_analysis
nmake /f Makefile.vc
cd ..
......@@ -17,6 +20,9 @@ all:
cd ..
clean:
cd file_utils
nmake /f Makefile.vc clean
cd ..
cd gain_analysis
nmake /f Makefile.vc clean
cd ..
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment