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

@@ -33,7 +33,7 @@ EXTRA_DIST = \
Makefile.lite \
Makefile.vc \
README \
plugin_common.dsp
plugin_common_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" -DSTRICT -YX /Od /D "_DEBUG" $<
$(cc) /D "_LIB" /GX $(cdebug) $(cflags) /I ".\include" /I "..\..\include" -DSTRICT -YX /Od /D "_DEBUG" $<
!else
.c.obj:
$(cc) /D "_LIB" -DFLAC__NO_DLL /O2 $(crelease) $(cflags) /I ".\include" /I "..\..\include" -DSTRICT -YX -DNODEBUG $<
$(cc) /D "_LIB" /O2 $(crelease) $(cflags) /I ".\include" /I "..\..\include" -DSTRICT -YX -DNODEBUG $<
!endif
C_FILES= \

View File

@@ -19,8 +19,6 @@
#ifndef FLAC__PLUGIN_COMMON__ALL_H
#define FLAC__PLUGIN_COMMON__ALL_H
#include "export.h"
#include "canonical_tag.h"
#include "charset.h"
#include "dither.h"

View File

@@ -19,8 +19,6 @@
#ifndef FLAC__PLUGIN_COMMON__CANONICAL_TAG_H
#define FLAC__PLUGIN_COMMON__CANONICAL_TAG_H
#include "export.h"
#include "id3v1.h"
typedef struct {
@@ -36,22 +34,22 @@ typedef struct {
char *comment;
} FLAC_Plugin__CanonicalTag;
PLUGIN_COMMON_API FLAC_Plugin__CanonicalTag *FLAC_plugin__canonical_tag_new();
PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_delete(FLAC_Plugin__CanonicalTag *);
PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_init(FLAC_Plugin__CanonicalTag *);
PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_clear(FLAC_Plugin__CanonicalTag *);
FLAC_Plugin__CanonicalTag *FLAC_plugin__canonical_tag_new();
void FLAC_plugin__canonical_tag_delete(FLAC_Plugin__CanonicalTag *);
void FLAC_plugin__canonical_tag_init(FLAC_Plugin__CanonicalTag *);
void FLAC_plugin__canonical_tag_clear(FLAC_Plugin__CanonicalTag *);
/* For each null field in dest, move the corresponding field from src
* WATCHOUT: note that src is not-const, because fields are 'moved' from
* src to dest and the src field is set to null.
*/
PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_merge(FLAC_Plugin__CanonicalTag *dest, FLAC_Plugin__CanonicalTag *src);
void FLAC_plugin__canonical_tag_merge(FLAC_Plugin__CanonicalTag *dest, FLAC_Plugin__CanonicalTag *src);
PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_convert_from_id3v1(FLAC_Plugin__CanonicalTag *, const FLAC_Plugin__Id3v1_Tag *);
void FLAC_plugin__canonical_tag_convert_from_id3v1(FLAC_Plugin__CanonicalTag *, const FLAC_Plugin__Id3v1_Tag *);
/* Returns a merged tag based on any Vorbis comments, id3v2 tag, and id3v1.
* In case of overlaps the preceding precedence applies.
*/
PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_get_combined(const char *filename, FLAC_Plugin__CanonicalTag *tag);
void FLAC_plugin__canonical_tag_get_combined(const char *filename, FLAC_Plugin__CanonicalTag *tag);
#endif

View File

@@ -30,12 +30,10 @@
* Prototypes *
**************/
#include "export.h"
PLUGIN_COMMON_API char *FLAC_plugin__charset_get_current();
PLUGIN_COMMON_API char *FLAC_plugin__charset_convert_string(const char *string, char *from, char *to);
char *FLAC_plugin__charset_get_current();
char *FLAC_plugin__charset_convert_string(const char *string, char *from, char *to);
/* returns 1 for success, 0 for failure or no iconv */
PLUGIN_COMMON_API int FLAC_plugin__charset_test_conversion(char *from, char *to);
int FLAC_plugin__charset_test_conversion(char *from, char *to);
#endif

View File

@@ -19,8 +19,6 @@
#ifndef FLAC__PLUGIN_COMMON__DEFS_H
#define FLAC__PLUGIN_COMMON__DEFS_H
#include "export.h"
#define FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS 2
#endif

View File

@@ -19,11 +19,9 @@
#ifndef FLAC__PLUGIN_COMMON__DITHER_H
#define FLAC__PLUGIN_COMMON__DITHER_H
#include "export.h"
#include "defs.h" /* buy FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS for the caller */
#include "FLAC/ordinals.h"
PLUGIN_COMMON_API unsigned FLAC__plugin_common__pack_pcm_signed_little_endian(FLAC__byte *data, FLAC__int32 *input, unsigned wide_samples, unsigned channels, unsigned source_bps, unsigned target_bps);
unsigned FLAC__plugin_common__pack_pcm_signed_little_endian(FLAC__byte *data, FLAC__int32 *input, unsigned wide_samples, unsigned channels, unsigned source_bps, unsigned target_bps);
#endif

View File

@@ -70,7 +70,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 "PLUGIN_COMMON_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 "PLUGIN_COMMON_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"
@@ -154,10 +154,6 @@ SOURCE=.\dither.h
# End Source File
# Begin Source File
SOURCE=.\export.h
# End Source File
# Begin Source File
SOURCE=.\id3v1.h
# End Source File
# Begin Source File

View File

@@ -1,37 +0,0 @@
/* plugin_common - Routines common to several plugins
* Copyright (C) 2002 Josh Coalson
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef FLAC__PLUGIN_COMMON__EXPORT_H
#define FLAC__PLUGIN_COMMON__EXPORT_H
#if defined(FLAC__NO_DLL) || defined(unix) || defined(__CYGWIN__) || defined(__CYGWIN32__)
#define PLUGIN_COMMON_API
#else
#ifdef PLUGIN_COMMON_API_EXPORTS
#define PLUGIN_COMMON_API _declspec(dllexport)
#else
#define PLUGIN_COMMON_API _declspec(dllimport)
#define __LIBNAME__ "plugin_common.lib"
#pragma comment(lib, __LIBNAME__)
#undef __LIBNAME__
#endif
#endif
#endif

View File

@@ -21,8 +21,6 @@
#include <string.h>
#include "export.h"
#include "FLAC/ordinals.h"
typedef struct {
@@ -44,12 +42,12 @@ typedef struct {
unsigned char genre;
} FLAC_Plugin__Id3v1_Tag;
PLUGIN_COMMON_API FLAC__bool FLAC_plugin__id3v1_tag_get(const char *filename, FLAC_Plugin__Id3v1_Tag *tag);
FLAC__bool FLAC_plugin__id3v1_tag_get(const char *filename, FLAC_Plugin__Id3v1_Tag *tag);
#define FLAC_PLUGIN__ID3V1_TAG_INVALID_GENRE 255
PLUGIN_COMMON_API const char *FLAC_plugin__id3v1_tag_get_genre_as_string(unsigned char genre_code);
PLUGIN_COMMON_API unsigned FLAC_plugin__id3v1_tag_genre_table_max();
const char *FLAC_plugin__id3v1_tag_get_genre_as_string(unsigned char genre_code);
unsigned FLAC_plugin__id3v1_tag_genre_table_max();
#endif

View File

@@ -0,0 +1,164 @@
# Microsoft Developer Studio Project File - Name="plugin_common_static" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=plugin_common_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 "plugin_common_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 "plugin_common_static.mak" CFG="plugin_common_static - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "plugin_common_static - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "plugin_common_static - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "plugin_common"
# PROP Scc_LocalPath "..\.."
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "plugin_common_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/plugin_common_static.lib"
!ELSEIF "$(CFG)" == "plugin_common_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/plugin_common_static.lib"
!ENDIF
# Begin Target
# Name "plugin_common_static - Win32 Release"
# Name "plugin_common_static - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp"
# Begin Source File
SOURCE=.\canonical_tag.c
# End Source File
# Begin Source File
SOURCE=.\charset.c
# End Source File
# Begin Source File
SOURCE=.\dither.c
# End Source File
# Begin Source File
SOURCE=.\id3v1.c
# End Source File
# Begin Source File
SOURCE=.\id3v2.c
# End Source File
# Begin Source File
SOURCE=.\replaygain_synthesis.c
# End Source File
# Begin Source File
SOURCE=.\vorbiscomment.c
# End Source File
# End Group
# Begin Group "Private Header Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\include\private\fast_float_math_hack.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=.\all.h
# End Source File
# Begin Source File
SOURCE=.\canonical_tag.h
# End Source File
# Begin Source File
SOURCE=.\charset.h
# End Source File
# Begin Source File
SOURCE=.\dither.h
# End Source File
# Begin Source File
SOURCE=.\id3v1.h
# End Source File
# Begin Source File
SOURCE=.\locale_hack.h
# End Source File
# Begin Source File
SOURCE=.\replaygain_synthesis.h
# End Source File
# Begin Source File
SOURCE=.\vorbiscomment.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -286,7 +286,7 @@ static FLAC__INLINE FLAC__int64 dither_output_(DitherContext *d, FLAC__bool do_d
#endif
PLUGIN_COMMON_API int FLAC__plugin_common__apply_gain(FLAC__byte *data_out, FLAC__int32 *input, unsigned wide_samples, unsigned channels, const unsigned source_bps, const unsigned target_bps, const float scale, const FLAC__bool hard_limit, FLAC__bool do_dithering, NoiseShaping noise_shaping, DitherContext *dither_context)
int FLAC__plugin_common__apply_gain(FLAC__byte *data_out, FLAC__int32 *input, unsigned wide_samples, unsigned channels, const unsigned source_bps, const unsigned target_bps, const float scale, const FLAC__bool hard_limit, FLAC__bool do_dithering, NoiseShaping noise_shaping, DitherContext *dither_context)
{
static const FLAC__int32 conv_factors_[33] = {
-1, /* 0 bits-per-sample (not supported) */

View File

@@ -19,8 +19,6 @@
#ifndef FLAC__PLUGIN_COMMON__REPLAYGAIN_SYNTHESIS_H
#define FLAC__PLUGIN_COMMON__REPLAYGAIN_SYNTHESIS_H
#include "export.h"
#include "defs.h"
#include "FLAC/ordinals.h"
@@ -41,9 +39,9 @@ typedef enum {
NOISE_SHAPING_HIGH = 3
} NoiseShaping;
PLUGIN_COMMON_API void FLAC__plugin_common__init_dither_context(DitherContext *dither, int bits, int shapingtype);
void FLAC__plugin_common__init_dither_context(DitherContext *dither, int bits, int shapingtype);
/* scale = (float) pow(10., (double)replaygain * 0.05); */
PLUGIN_COMMON_API int FLAC__plugin_common__apply_gain(FLAC__byte *data_out, FLAC__int32 *input, unsigned wide_samples, unsigned channels, const unsigned source_bps, const unsigned target_bps, const float scale, const FLAC__bool hard_limit, FLAC__bool do_dithering, NoiseShaping noise_shaping, DitherContext *dither_context);
int FLAC__plugin_common__apply_gain(FLAC__byte *data_out, FLAC__int32 *input, unsigned wide_samples, unsigned channels, const unsigned source_bps, const unsigned target_bps, const float scale, const FLAC__bool hard_limit, FLAC__bool do_dithering, NoiseShaping noise_shaping, DitherContext *dither_context);
#endif

View File

@@ -19,12 +19,10 @@
#ifndef FLAC__PLUGIN_COMMON__VORBISCOMMENT_H
#define FLAC__PLUGIN_COMMON__VORBISCOMMENT_H
#include "export.h"
#include "canonical_tag.h"
#include "FLAC/ordinals.h"
PLUGIN_COMMON_API void FLAC_plugin__vorbiscomment_get(const char *filename, FLAC_Plugin__CanonicalTag *tag);
PLUGIN_COMMON_API FLAC__bool FLAC_plugin__vorbiscomment_set(const char *filename, FLAC_Plugin__CanonicalTag *tag);
void FLAC_plugin__vorbiscomment_get(const char *filename, FLAC_Plugin__CanonicalTag *tag);
FLAC__bool FLAC_plugin__vorbiscomment_set(const char *filename, FLAC_Plugin__CanonicalTag *tag);
#endif