revamp MSVC build system, separate dynamic and static builds, separate debug and release intermediate directories

This commit is contained in:
Josh Coalson
2002-11-21 09:00:25 +00:00
parent 48404ff9c3
commit bfc8e319c2
76 changed files with 2169 additions and 449 deletions

View File

@@ -11,7 +11,7 @@ libgain_analysis_a_SOURCES = gain_analysis.c
EXTRA_DIST = \
Makefile.lite \
Makefile.vc \
gain_analysis.dsp
gain_analysis_static.dsp
debug:
$(MAKE) all CFLAGS="@DEBUG@"

View File

@@ -2,10 +2,10 @@
!IFDEF DEBUG
.c.obj:
$(cc) /D "_LIB" -DFLAC__NO_DLL /GX $(cdebug) $(cflags) /I "..\..\..\include\share" -DSTRICT -YX /Od /D "_DEBUG" $<
$(cc) /D "_LIB" /GX $(cdebug) $(cflags) /I "..\..\..\include\share" -DSTRICT -YX /Od /D "_DEBUG" $<
!else
.c.obj:
$(cc) /D "_LIB" -DFLAC__NO_DLL /O2 $(crelease) $(cflags) /I "..\..\..\include\share" -DSTRICT -YX -DNODEBUG $<
$(cc) /D "_LIB" /O2 $(crelease) $(cflags) /I "..\..\..\include\share" -DSTRICT -YX -DNODEBUG $<
!endif
C_FILES= \

View File

@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I ".\include" /I "..\..\..\include\share" /D "_DEBUG" /D "_CHATTER" /D "GAIN_ANALYSIS_API_EXPORTS" /D "_WINDOWS" /D "_WINDLL" /D "WIN32" /D "_USRDLL" /FR /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I ".\include" /I "..\..\..\include\share" /D "_DEBUG" /D "GAIN_ANALYSIS_API_EXPORTS" /D "_WINDOWS" /D "_WINDLL" /D "WIN32" /D "_USRDLL" /FR /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"

View File

@@ -211,7 +211,6 @@ filter ( const Float_t* input, Float_t* output, size_t nSamples, const Float_t*
/* returns a INIT_GAIN_ANALYSIS_OK if successful, INIT_GAIN_ANALYSIS_ERROR if not */
GAIN_ANALYSIS_API
int
ResetSampleFrequency ( long samplefreq ) {
int i;
@@ -244,7 +243,6 @@ ResetSampleFrequency ( long samplefreq ) {
return INIT_GAIN_ANALYSIS_OK;
}
GAIN_ANALYSIS_API
int
InitGainAnalysis ( long samplefreq )
{
@@ -266,7 +264,6 @@ InitGainAnalysis ( long samplefreq )
/* returns GAIN_ANALYSIS_OK if successful, GAIN_ANALYSIS_ERROR if not */
GAIN_ANALYSIS_API
int
AnalyzeSamples ( const Float_t* left_samples, const Float_t* right_samples, size_t num_samples, int num_channels )
{
@@ -379,7 +376,6 @@ analyzeResult ( Uint32_t* Array, size_t len )
}
GAIN_ANALYSIS_API
Float_t
GetTitleGain ( void )
{
@@ -402,7 +398,6 @@ GetTitleGain ( void )
}
GAIN_ANALYSIS_API
Float_t
GetAlbumGain ( void )
{

View File

@@ -0,0 +1,108 @@
# Microsoft Developer Studio Project File - Name="gain_analysis_static" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=gain_analysis_static - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "gain_analysis_static.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "gain_analysis_static.mak" CFG="gain_analysis_static - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gain_analysis_static - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "gain_analysis_static - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "gain_analysis"
# PROP Scc_LocalPath "..\..\.."
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "gain_analysis_static - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\obj\release\lib"
# PROP Intermediate_Dir "Release_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I ".\include" /I "..\..\..\include\share" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nodefaultlib /nologo /out:"..\..\..\obj\release\lib/gain_analysis_static.lib"
!ELSEIF "$(CFG)" == "gain_analysis_static - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\obj\debug\lib"
# PROP Intermediate_Dir "Debug_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".\include" /I "..\..\..\include\share" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nodefaultlib /nologo /out:"..\..\..\obj\debug\lib/gain_analysis_static.lib"
!ENDIF
# Begin Target
# Name "gain_analysis_static - Win32 Release"
# Name "gain_analysis_static - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "c"
# Begin Source File
SOURCE=.\gain_analysis.c
# End Source File
# End Group
# Begin Group "Private Header Files"
# PROP Default_Filter ""
# End Group
# Begin Group "Protected Header Files"
# PROP Default_Filter ""
# End Group
# Begin Group "Public Header Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\include\share\gain_analysis.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -11,7 +11,7 @@ libgetopt_a_SOURCES = getopt.c getopt1.c
EXTRA_DIST = \
Makefile.lite \
Makefile.vc \
getopt.dsp
getopt_static.dsp
debug:
$(MAKE) all CFLAGS="@DEBUG@"

View File

@@ -2,10 +2,10 @@
!IFDEF DEBUG
.c.obj:
$(cc) /D "_LIB" -DFLAC__NO_DLL /GX $(cdebug) $(cflags) /I "..\..\..\include" /I "..\..\..\include\share" -DSTRICT -YX /Od /D "_DEBUG" $<
$(cc) /D "_LIB" /GX $(cdebug) $(cflags) /I "..\..\..\include" /I "..\..\..\include\share" -DSTRICT -YX /Od /D "_DEBUG" $<
!else
.c.obj:
$(cc) /D "_LIB" -DFLAC__NO_DLL /O2 $(crelease) $(cflags) /I "..\..\..\include" /I "..\..\..\include\share" -DSTRICT -YX -DNODEBUG $<
$(cc) /D "_LIB" /O2 $(crelease) $(cflags) /I "..\..\..\include" /I "..\..\..\include\share" -DSTRICT -YX -DNODEBUG $<
!endif
C_FILES= \

View File

@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I ".\include" /I "..\..\..\include" /D "_DEBUG" /D "_CHATTER" /D "GETOPT_API_EXPORTS" /D "_WINDOWS" /D "_WINDLL" /D "WIN32" /D "_USRDLL" /FR /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I ".\include" /I "..\..\..\include" /D "_DEBUG" /D "GETOPT_API_EXPORTS" /D "_WINDOWS" /D "_WINDLL" /D "WIN32" /D "_USRDLL" /FR /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"

View File

@@ -125,7 +125,7 @@
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
GETOPT_API char *share__optarg;
char *share__optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
@@ -140,7 +140,7 @@ GETOPT_API char *share__optarg;
how much of ARGV has been scanned so far. */
/* 1003.2 says this must be 1 before any call. */
GETOPT_API int share__optind = 1;
int share__optind = 1;
/* Formerly, initialization of getopt depended on share__optind==0, which
causes problems with re-calling getopt as programs generally don't
@@ -160,13 +160,13 @@ static char *nextchar;
/* Callers store zero here to inhibit the error message
for unrecognized options. */
GETOPT_API int share__opterr = 1;
int share__opterr = 1;
/* Set to an option character which was unrecognized.
This must be initialized on some systems to avoid linking in the
system's own getopt implementation. */
GETOPT_API int share__optopt = '?';
int share__optopt = '?';
/* Describe how to deal with options that follow non-option ARGV-elements.
@@ -522,7 +522,7 @@ share___getopt_initialize (argc, argv, optstring)
If LONG_ONLY is nonzero, '-' as well as '--' can introduce
long-named options. */
GETOPT_API int
int
share___getopt_internal (argc, argv, optstring, longopts, longind, long_only)
int argc;
char *const *argv;
@@ -978,7 +978,7 @@ share___getopt_internal (argc, argv, optstring, longopts, longind, long_only)
}
}
GETOPT_API int
int
share__getopt (argc, argv, optstring)
int argc;
char *const *argv;

View File

@@ -79,7 +79,7 @@
#define NULL 0
#endif
GETOPT_API int
int
share__getopt_long (argc, argv, options, long_options, opt_index)
int argc;
char *const *argv;
@@ -95,7 +95,7 @@ share__getopt_long (argc, argv, options, long_options, opt_index)
but does match a short option, it is parsed as a short option
instead. */
GETOPT_API int
int
share__getopt_long_only (argc, argv, options, long_options, opt_index)
int argc;
char *const *argv;

View File

@@ -0,0 +1,112 @@
# Microsoft Developer Studio Project File - Name="getopt_static" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=getopt_static - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "getopt_static.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "getopt_static.mak" CFG="getopt_static - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "getopt_static - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "getopt_static - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "getopt"
# PROP Scc_LocalPath "..\..\.."
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "getopt_static - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\obj\release\lib"
# PROP Intermediate_Dir "Release_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I ".\include" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nodefaultlib /nologo /out:"..\..\..\obj\release\lib/getopt_static.lib"
!ELSEIF "$(CFG)" == "getopt_static - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\obj\debug\lib"
# PROP Intermediate_Dir "Debug_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nodefaultlib /nologo /out:"..\..\..\obj\debug\lib/getopt_static.lib"
!ENDIF
# Begin Target
# Name "getopt_static - Win32 Release"
# Name "getopt_static - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "c"
# Begin Source File
SOURCE=.\getopt.c
# End Source File
# Begin Source File
SOURCE=.\getopt1.c
# End Source File
# End Group
# Begin Group "Private Header Files"
# PROP Default_Filter ""
# End Group
# Begin Group "Protected Header Files"
# PROP Default_Filter ""
# End Group
# Begin Group "Public Header Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\include\share\getopt.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -15,7 +15,7 @@ libgrabbag_a_SOURCES = \
EXTRA_DIST = \
Makefile.lite \
Makefile.vc \
grabbag.dsp
grabbag_static.dsp
debug:
$(MAKE) all CFLAGS="@DEBUG@"

View File

@@ -2,10 +2,10 @@
!IFDEF DEBUG
.c.obj:
$(cc) /D "_LIB" -DFLAC__NO_DLL /GX $(cdebug) $(cflags) /I "..\..\..\include" -DSTRICT -YX /Od /D "_DEBUG" $<
$(cc) /D "_LIB" /GX $(cdebug) $(cflags) /I "..\..\..\include" -DSTRICT -YX /Od /D "_DEBUG" $<
!else
.c.obj:
$(cc) /D "_LIB" -DFLAC__NO_DLL /O2 $(crelease) $(cflags) /I "..\..\..\include" -DSTRICT -YX -DNODEBUG $<
$(cc) /D "_LIB" /O2 $(crelease) $(cflags) /I "..\..\..\include" -DSTRICT -YX -DNODEBUG $<
!endif
C_FILES= \

View File

@@ -22,12 +22,12 @@
#include <stdlib.h>
#include <string.h>
GRABBAG_API unsigned grabbag__cuesheet_msf_to_frame(unsigned minutes, unsigned seconds, unsigned frames)
unsigned grabbag__cuesheet_msf_to_frame(unsigned minutes, unsigned seconds, unsigned frames)
{
return ((minutes * 60) + seconds) * 75 + frames;
}
GRABBAG_API void grabbag__cuesheet_frame_to_msf(unsigned frame, unsigned *minutes, unsigned *seconds, unsigned *frames)
void grabbag__cuesheet_frame_to_msf(unsigned frame, unsigned *minutes, unsigned *seconds, unsigned *frames)
{
*frames = frame % 75;
frame /= 75;
@@ -454,7 +454,7 @@ static FLAC__bool local__cuesheet_parse_(FILE *file, const char **error_message,
#undef FLAC__STRCASECMP
}
GRABBAG_API FLAC__StreamMetadata *grabbag__cuesheet_parse(FILE *file, const char **error_message, unsigned *last_line_read, FLAC__bool is_cdda, FLAC__uint64 lead_out_offset)
FLAC__StreamMetadata *grabbag__cuesheet_parse(FILE *file, const char **error_message, unsigned *last_line_read, FLAC__bool is_cdda, FLAC__uint64 lead_out_offset)
{
FLAC__StreamMetadata *cuesheet;

View File

@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I ".\include" /I "..\..\..\include" /D "_DEBUG" /D "_CHATTER" /D "GRABBAG_API_EXPORTS" /D "_WINDOWS" /D "_WINDLL" /D "WIN32" /D "_USRDLL" /FR /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I ".\include" /I "..\..\..\include" /D "_DEBUG" /D "GRABBAG_API_EXPORTS" /D "_WINDOWS" /D "_WINDLL" /D "WIN32" /D "_USRDLL" /FR /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"

View File

@@ -39,7 +39,7 @@
#include "share/grabbag.h"
GRABBAG_API void grabbag__file_copy_metadata(const char *srcpath, const char *destpath)
void grabbag__file_copy_metadata(const char *srcpath, const char *destpath)
{
struct stat srcstat;
struct utimbuf srctime;
@@ -52,7 +52,7 @@ GRABBAG_API void grabbag__file_copy_metadata(const char *srcpath, const char *de
}
}
GRABBAG_API off_t grabbag__file_get_filesize(const char *srcpath)
off_t grabbag__file_get_filesize(const char *srcpath)
{
struct stat srcstat;
@@ -62,7 +62,7 @@ GRABBAG_API off_t grabbag__file_get_filesize(const char *srcpath)
return -1;
}
GRABBAG_API const char *grabbag__file_get_basename(const char *srcpath)
const char *grabbag__file_get_basename(const char *srcpath)
{
const char *p;
@@ -75,7 +75,7 @@ GRABBAG_API const char *grabbag__file_get_basename(const char *srcpath)
return ++p;
}
GRABBAG_API FLAC__bool grabbag__file_change_stats(const char *filename, FLAC__bool read_only)
FLAC__bool grabbag__file_change_stats(const char *filename, FLAC__bool read_only)
{
struct stat stats;
@@ -104,12 +104,12 @@ GRABBAG_API FLAC__bool grabbag__file_change_stats(const char *filename, FLAC__bo
return true;
}
GRABBAG_API FLAC__bool grabbag__file_remove_file(const char *filename)
FLAC__bool grabbag__file_remove_file(const char *filename)
{
return grabbag__file_change_stats(filename, /*read_only=*/false) && 0 == unlink(filename);
}
GRABBAG_API FILE *grabbag__file_get_binary_stdin()
FILE *grabbag__file_get_binary_stdin()
{
/* if something breaks here it is probably due to the presence or
* absence of an underscore before the identifiers 'setmode',
@@ -125,7 +125,7 @@ GRABBAG_API FILE *grabbag__file_get_binary_stdin()
return stdin;
}
GRABBAG_API FILE *grabbag__file_get_binary_stdout()
FILE *grabbag__file_get_binary_stdout()
{
/* if something breaks here it is probably due to the presence or
* absence of an underscore before the identifiers 'setmode',

View File

@@ -0,0 +1,136 @@
# Microsoft Developer Studio Project File - Name="grabbag_static" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=grabbag_static - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "grabbag_static.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "grabbag_static.mak" CFG="grabbag_static - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "grabbag_static - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "grabbag_static - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "grabbag"
# PROP Scc_LocalPath "..\..\.."
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "grabbag_static - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\obj\release\lib"
# PROP Intermediate_Dir "Release_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I ".\include" /I "..\..\..\include" /D "FLAC__NO_DLL" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nodefaultlib /nologo /out:"..\..\..\obj\release\lib/grabbag_static.lib"
!ELSEIF "$(CFG)" == "grabbag_static - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\obj\debug\lib"
# PROP Intermediate_Dir "Debug_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".\include" /I "..\..\..\include" /D "FLAC__NO_DLL" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nodefaultlib /nologo /out:"..\..\..\obj\debug\lib/grabbag_static.lib"
!ENDIF
# Begin Target
# Name "grabbag_static - Win32 Release"
# Name "grabbag_static - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "c"
# Begin Source File
SOURCE=.\cuesheet.c
# End Source File
# Begin Source File
SOURCE=.\file.c
# End Source File
# Begin Source File
SOURCE=.\replaygain.c
# End Source File
# Begin Source File
SOURCE=.\seektable.c
# End Source File
# End Group
# Begin Group "Private Header Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\include\share\grabbag\cuesheet.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\share\grabbag\file.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\share\grabbag\replaygain.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\share\grabbag\seektable.h
# End Source File
# End Group
# Begin Group "Protected Header Files"
# PROP Default_Filter ""
# End Group
# Begin Group "Public Header Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\include\share\grabbag.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -49,7 +49,7 @@ static const char *gain_format_ = "%s=%+2.2f dB";
static double album_peak_, title_peak_;
GRABBAG_API const unsigned GRABBAG__REPLAYGAIN_MAX_TAG_SPACE_REQUIRED = 148;
const unsigned GRABBAG__REPLAYGAIN_MAX_TAG_SPACE_REQUIRED = 148;
/*
FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN/8 + 21 + 1 + 10 +
FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN/8 + 21 + 1 + 12 +
@@ -96,7 +96,7 @@ static FLAC__bool append_tag_(FLAC__StreamMetadata *block, const char *format, c
return FLAC__metadata_object_vorbiscomment_insert_comment(block, block->data.vorbis_comment.num_comments, entry, /*copy=*/true);
}
GRABBAG_API FLAC__bool grabbag__replaygain_is_valid_sample_frequency(unsigned sample_frequency)
FLAC__bool grabbag__replaygain_is_valid_sample_frequency(unsigned sample_frequency)
{
static const unsigned valid_sample_rates[] = {
8000,
@@ -119,13 +119,13 @@ GRABBAG_API FLAC__bool grabbag__replaygain_is_valid_sample_frequency(unsigned sa
return false;
}
GRABBAG_API FLAC__bool grabbag__replaygain_init(unsigned sample_frequency)
FLAC__bool grabbag__replaygain_init(unsigned sample_frequency)
{
title_peak_ = album_peak_ = 0.0;
return InitGainAnalysis((long)sample_frequency) == INIT_GAIN_ANALYSIS_OK;
}
GRABBAG_API FLAC__bool grabbag__replaygain_analyze(const FLAC__int32 * const input[], FLAC__bool is_stereo, unsigned bps, unsigned samples)
FLAC__bool grabbag__replaygain_analyze(const FLAC__int32 * const input[], FLAC__bool is_stereo, unsigned bps, unsigned samples)
{
/* using a small buffer improves data locality; we'd like it to fit easily in the dcache */
static Float_t lbuffer[2048], rbuffer[2048];
@@ -235,14 +235,14 @@ GRABBAG_API FLAC__bool grabbag__replaygain_analyze(const FLAC__int32 * const inp
return true;
}
GRABBAG_API void grabbag__replaygain_get_album(float *gain, float *peak)
void grabbag__replaygain_get_album(float *gain, float *peak)
{
*gain = (float)GetAlbumGain();
*peak = (float)album_peak_;
album_peak_ = 0.0;
}
GRABBAG_API void grabbag__replaygain_get_title(float *gain, float *peak)
void grabbag__replaygain_get_title(float *gain, float *peak)
{
*gain = (float)GetTitleGain();
*peak = (float)title_peak_;
@@ -318,7 +318,7 @@ static void error_callback_(const FLAC__FileDecoder *decoder, FLAC__StreamDecode
instance->error = true;
}
GRABBAG_API const char *grabbag__replaygain_analyze_file(const char *filename, float *title_gain, float *title_peak)
const char *grabbag__replaygain_analyze_file(const char *filename, float *title_gain, float *title_peak)
{
DecoderInstance instance;
FLAC__FileDecoder *decoder = FLAC__file_decoder_new();
@@ -356,7 +356,7 @@ GRABBAG_API const char *grabbag__replaygain_analyze_file(const char *filename, f
return 0;
}
GRABBAG_API const char *grabbag__replaygain_store_to_vorbiscomment(FLAC__StreamMetadata *block, float album_gain, float album_peak, float title_gain, float title_peak)
const char *grabbag__replaygain_store_to_vorbiscomment(FLAC__StreamMetadata *block, float album_gain, float album_peak, float title_gain, float title_peak)
{
const char *error;
@@ -369,7 +369,7 @@ GRABBAG_API const char *grabbag__replaygain_store_to_vorbiscomment(FLAC__StreamM
return 0;
}
GRABBAG_API const char *grabbag__replaygain_store_to_vorbiscomment_album(FLAC__StreamMetadata *block, float album_gain, float album_peak)
const char *grabbag__replaygain_store_to_vorbiscomment_album(FLAC__StreamMetadata *block, float album_gain, float album_peak)
{
FLAC__ASSERT(0 != block);
FLAC__ASSERT(block->type == FLAC__METADATA_TYPE_VORBIS_COMMENT);
@@ -389,7 +389,7 @@ GRABBAG_API const char *grabbag__replaygain_store_to_vorbiscomment_album(FLAC__S
return 0;
}
GRABBAG_API const char *grabbag__replaygain_store_to_vorbiscomment_title(FLAC__StreamMetadata *block, float title_gain, float title_peak)
const char *grabbag__replaygain_store_to_vorbiscomment_title(FLAC__StreamMetadata *block, float title_gain, float title_peak)
{
FLAC__ASSERT(0 != block);
FLAC__ASSERT(block->type == FLAC__METADATA_TYPE_VORBIS_COMMENT);
@@ -486,7 +486,7 @@ static const char *store_to_file_post_(const char *filename, FLAC__Metadata_Chai
return 0;
}
GRABBAG_API const char *grabbag__replaygain_store_to_file(const char *filename, float album_gain, float album_peak, float title_gain, float title_peak, FLAC__bool preserve_modtime)
const char *grabbag__replaygain_store_to_file(const char *filename, float album_gain, float album_peak, float title_gain, float title_peak, FLAC__bool preserve_modtime)
{
FLAC__Metadata_Chain *chain;
FLAC__StreamMetadata *block;
@@ -506,7 +506,7 @@ GRABBAG_API const char *grabbag__replaygain_store_to_file(const char *filename,
return 0;
}
GRABBAG_API const char *grabbag__replaygain_store_to_file_album(const char *filename, float album_gain, float album_peak, FLAC__bool preserve_modtime)
const char *grabbag__replaygain_store_to_file_album(const char *filename, float album_gain, float album_peak, FLAC__bool preserve_modtime)
{
FLAC__Metadata_Chain *chain;
FLAC__StreamMetadata *block;
@@ -526,7 +526,7 @@ GRABBAG_API const char *grabbag__replaygain_store_to_file_album(const char *file
return 0;
}
GRABBAG_API const char *grabbag__replaygain_store_to_file_title(const char *filename, float title_gain, float title_peak, FLAC__bool preserve_modtime)
const char *grabbag__replaygain_store_to_file_title(const char *filename, float title_gain, float title_peak, FLAC__bool preserve_modtime)
{
FLAC__Metadata_Chain *chain;
FLAC__StreamMetadata *block;
@@ -571,7 +571,7 @@ static FLAC__bool parse_double_(const FLAC__StreamMetadata_VorbisComment_Entry *
return true;
}
GRABBAG_API FLAC__bool grabbag__replaygain_load_from_vorbiscomment(const FLAC__StreamMetadata *block, FLAC__bool album_mode, double *gain, double *peak)
FLAC__bool grabbag__replaygain_load_from_vorbiscomment(const FLAC__StreamMetadata *block, FLAC__bool album_mode, double *gain, double *peak)
{
int gain_offset, peak_offset;
@@ -591,7 +591,7 @@ GRABBAG_API FLAC__bool grabbag__replaygain_load_from_vorbiscomment(const FLAC__S
return true;
}
GRABBAG_API double grabbag__replaygain_compute_scale_factor(double peak, double gain, double preamp, FLAC__bool prevent_clipping)
double grabbag__replaygain_compute_scale_factor(double peak, double gain, double preamp, FLAC__bool prevent_clipping)
{
double scale;
FLAC__ASSERT(peak >= 0.0);

View File

@@ -21,7 +21,7 @@
#include <stdlib.h> /* for atoi() */
#include <string.h>
GRABBAG_API FLAC__bool grabbag__seektable_convert_specification_to_template(const char *spec, FLAC__bool only_explicit_placeholders, FLAC__uint64 total_samples_to_encode, unsigned sample_rate, FLAC__StreamMetadata *seektable_template, FLAC__bool *spec_has_real_points)
FLAC__bool grabbag__seektable_convert_specification_to_template(const char *spec, FLAC__bool only_explicit_placeholders, FLAC__uint64 total_samples_to_encode, unsigned sample_rate, FLAC__StreamMetadata *seektable_template, FLAC__bool *spec_has_real_points)
{
unsigned i;
const char *pt;

View File

@@ -16,7 +16,7 @@ EXTRA_DIST = \
makemap.c \
charset_test.c \
charsetmap.h \
utf8.dsp
utf8_static.dsp
debug:
$(MAKE) all CFLAGS="@DEBUG@"

View File

@@ -2,10 +2,10 @@
!IFDEF DEBUG
.c.obj:
$(cc) /D "_LIB" -DFLAC__NO_DLL /GX $(cdebug) $(cflags) /I "..\..\..\include" /I "..\..\..\include\share" -DSTRICT -YX /Od /D "_DEBUG" $<
$(cc) /D "_LIB" /GX $(cdebug) $(cflags) /I "..\..\..\include" /I "..\..\..\include\share" -DSTRICT -YX /Od /D "_DEBUG" $<
!else
.c.obj:
$(cc) /D "_LIB" -DFLAC__NO_DLL /O2 $(crelease) $(cflags) /I "..\..\..\include" /I "..\..\..\include\share" -DSTRICT -YX -DNODEBUG $<
$(cc) /D "_LIB" /O2 $(crelease) $(cflags) /I "..\..\..\include" /I "..\..\..\include\share" -DSTRICT -YX -DNODEBUG $<
!endif
C_FILES= \

View File

@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I ".\include" /I "..\..\..\include\share" /D "_DEBUG" /D "_CHATTER" /D "UTF8_API_EXPORTS" /D "_WINDOWS" /D "_WINDLL" /D "WIN32" /D "_USRDLL" /FR /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I ".\include" /I "..\..\..\include\share" /D "_DEBUG" /D "UTF8_API_EXPORTS" /D "_WINDOWS" /D "_WINDLL" /D "WIN32" /D "_USRDLL" /FR /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"

View File

@@ -233,7 +233,7 @@ int iconvert(const char *fromcode, const char *tocode,
static char *current_charset = 0; /* means "US-ASCII" */
UTF8_API void convert_set_charset(const char *charset)
void convert_set_charset(const char *charset)
{
#ifdef HAVE_LANGINFO_CODESET
@@ -296,7 +296,7 @@ static int convert_string(const char *fromcode, const char *tocode,
return 3;
}
UTF8_API int utf8_encode(const char *from, char **to)
int utf8_encode(const char *from, char **to)
{
char *charset;
@@ -306,7 +306,7 @@ UTF8_API int utf8_encode(const char *from, char **to)
return convert_string(charset, "UTF-8", from, to, '#');
}
UTF8_API int utf8_decode(const char *from, char **to)
int utf8_decode(const char *from, char **to)
{
char *charset;

View File

@@ -0,0 +1,116 @@
# Microsoft Developer Studio Project File - Name="utf8_static" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=utf8_static - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "utf8_static.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "utf8_static.mak" CFG="utf8_static - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "utf8_static - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "utf8_static - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "utf8"
# PROP Scc_LocalPath "..\..\.."
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "utf8_static - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\obj\release\lib"
# PROP Intermediate_Dir "Release_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I ".\include" /I "..\..\..\include\share" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nodefaultlib /nologo /out:"..\..\..\obj\release\lib/utf8_static.lib"
!ELSEIF "$(CFG)" == "utf8_static - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\obj\debug\lib"
# PROP Intermediate_Dir "Debug_static"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".\include" /I "..\..\..\include\share" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nodefaultlib /nologo /out:"..\..\..\obj\debug\lib/utf8_static.lib"
!ENDIF
# Begin Target
# Name "utf8_static - Win32 Release"
# Name "utf8_static - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "c"
# Begin Source File
SOURCE=.\charset.c
# End Source File
# Begin Source File
SOURCE=.\iconvert.c
# End Source File
# Begin Source File
SOURCE=.\utf8.c
# End Source File
# End Group
# Begin Group "Private Header Files"
# PROP Default_Filter ""
# End Group
# Begin Group "Protected Header Files"
# PROP Default_Filter ""
# End Group
# Begin Group "Public Header Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\include\share\utf8.h
# End Source File
# End Group
# End Target
# End Project