From d40a6bc695984ba0d35b795874f387f73cfadada Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Fri, 5 Feb 2016 11:02:44 +1100 Subject: [PATCH] libFLAC: Remove win_utf8_io dependency Path-from: lvqcl --- FLAC-vs2005.sln | 19 --- Makefile.deps | 15 +- Makefile.lite | 4 +- examples/c/decode/file/Makefile.lite | 4 - .../decode/file/example_c_decode_file.vcxproj | 4 - examples/c/encode/file/Makefile.lite | 4 - .../encode/file/example_c_encode_file.vcxproj | 4 - examples/cpp/decode/file/Makefile.lite | 4 - .../file/example_cpp_decode_file.vcxproj | 4 - examples/cpp/encode/file/Makefile.lite | 4 - .../file/example_cpp_encode_file.vcxproj | 4 - include/share/Makefile.am | 3 +- include/share/compat.h | 15 +- include/share/win_utf8_io.h | 8 +- src/Makefile.am | 2 +- src/flac/Makefile.am | 5 + src/libFLAC++/Makefile.lite | 4 - src/libFLAC++/libFLAC++_dynamic.vcxproj | 4 - src/libFLAC++/libFLAC++_static.vcxproj | 4 - src/libFLAC/Makefile.am | 11 +- src/libFLAC/Makefile.lite | 7 +- src/libFLAC/libFLAC_dynamic.vcproj | 40 ++++- src/libFLAC/libFLAC_dynamic.vcxproj | 14 +- src/libFLAC/libFLAC_dynamic.vcxproj.filters | 24 +++ src/libFLAC/libFLAC_static.vcproj | 40 ++++- src/libFLAC/libFLAC_static.vcxproj | 13 +- src/libFLAC/libFLAC_static.vcxproj.filters | 24 +++ src/metaflac/Makefile.am | 5 + src/plugin_common/Makefile.lite | 4 - src/plugin_xmms/Makefile.lite | 4 - src/share/Makefile.am | 2 +- src/share/grabbag/Makefile.lite | 6 +- src/share/grabbag/grabbag_static.vcxproj | 4 - src/share/win_utf8_io/Makefile.lite | 6 + src/share/win_utf8_io/win_utf8_io.c | 141 +----------------- src/test_grabbag/cuesheet/Makefile.lite | 4 - .../cuesheet/test_cuesheet.vcxproj | 4 - src/test_grabbag/picture/Makefile.am | 1 + src/test_grabbag/picture/Makefile.lite | 4 - src/test_grabbag/picture/test_picture.vcxproj | 4 - src/test_libFLAC++/Makefile.lite | 4 - src/test_libFLAC++/test_libFLAC++.vcxproj | 4 - src/test_libFLAC/Makefile.am | 8 +- src/test_libFLAC/Makefile.lite | 4 - src/test_libFLAC/test_libFLAC.vcxproj | 4 - src/test_libs_common/Makefile.am | 2 + src/test_libs_common/Makefile.lite | 4 - .../test_libs_common_static.vcxproj | 4 - src/test_seeking/Makefile.lite | 4 - src/test_seeking/test_seeking.vcxproj | 4 - src/utils/flactimer/Makefile.lite | 8 +- 51 files changed, 196 insertions(+), 331 deletions(-) diff --git a/FLAC-vs2005.sln b/FLAC-vs2005.sln index 41c842aa..24fbacd6 100644 --- a/FLAC-vs2005.sln +++ b/FLAC-vs2005.sln @@ -4,27 +4,23 @@ Microsoft Visual Studio Solution File, Format Version 9.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_c_decode_file", "examples\c\decode\file\example_c_decode_file.vcproj", "{4CEFBD00-C215-11DB-8314-0800200C9A66}" ProjectSection(ProjectDependencies) = postProject {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_c_encode_file", "examples\c\encode\file\example_c_encode_file.vcproj", "{4CEFBD01-C215-11DB-8314-0800200C9A66}" ProjectSection(ProjectDependencies) = postProject {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_cpp_decode_file", "examples\cpp\decode\file\example_cpp_decode_file.vcproj", "{4CEFBE00-C215-11DB-8314-0800200C9A66}" ProjectSection(ProjectDependencies) = postProject {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} {4CEFBC86-C215-11DB-8314-0800200C9A66} = {4CEFBC86-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_cpp_encode_file", "examples\cpp\encode\file\example_cpp_encode_file.vcproj", "{4CEFBE01-C215-11DB-8314-0800200C9A66}" ProjectSection(ProjectDependencies) = postProject {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} {4CEFBC86-C215-11DB-8314-0800200C9A66} = {4CEFBC86-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flac", "src\flac\flac.vcproj", "{4CEFBC7D-C215-11DB-8314-0800200C9A66}" @@ -59,29 +55,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grabbag_static", "src\share ProjectSection(ProjectDependencies) = postProject {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} {4CEFBC89-C215-11DB-8314-0800200C9A66} = {4CEFBC89-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC_dynamic", "src\libFLAC\libFLAC_dynamic.vcproj", "{4CEFBC83-C215-11DB-8314-0800200C9A66}" - ProjectSection(ProjectDependencies) = postProject - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC_static", "src\libFLAC\libFLAC_static.vcproj", "{4CEFBC84-C215-11DB-8314-0800200C9A66}" - ProjectSection(ProjectDependencies) = postProject - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC++_dynamic", "src\libFLAC++\libFLAC++_dynamic.vcproj", "{4CEFBC85-C215-11DB-8314-0800200C9A66}" ProjectSection(ProjectDependencies) = postProject {4CEFBC83-C215-11DB-8314-0800200C9A66} = {4CEFBC83-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC++_static", "src\libFLAC++\libFLAC++_static.vcproj", "{4CEFBC86-C215-11DB-8314-0800200C9A66}" ProjectSection(ProjectDependencies) = postProject {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "metaflac", "src\metaflac\metaflac.vcproj", "{4CEFBC87-C215-11DB-8314-0800200C9A66}" @@ -102,7 +89,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_cuesheet", "src\test_g ProjectSection(ProjectDependencies) = postProject {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} {4CEFBC81-C215-11DB-8314-0800200C9A66} = {4CEFBC81-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libFLAC", "src\test_libFLAC\test_libFLAC.vcproj", "{4CEFBC8C-C215-11DB-8314-0800200C9A66}" @@ -110,7 +96,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libFLAC", "src\test_li {4CEFBC8E-C215-11DB-8314-0800200C9A66} = {4CEFBC8E-C215-11DB-8314-0800200C9A66} {4CEFBC81-C215-11DB-8314-0800200C9A66} = {4CEFBC81-C215-11DB-8314-0800200C9A66} {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libFLAC++", "src\test_libFLAC++\test_libFLAC++.vcproj", "{4CEFBC8D-C215-11DB-8314-0800200C9A66}" @@ -119,26 +104,22 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libFLAC++", "src\test_ {4CEFBC86-C215-11DB-8314-0800200C9A66} = {4CEFBC86-C215-11DB-8314-0800200C9A66} {4CEFBC81-C215-11DB-8314-0800200C9A66} = {4CEFBC81-C215-11DB-8314-0800200C9A66} {4CEFBC8E-C215-11DB-8314-0800200C9A66} = {4CEFBC8E-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libs_common_static", "src\test_libs_common\test_libs_common_static.vcproj", "{4CEFBC8E-C215-11DB-8314-0800200C9A66}" ProjectSection(ProjectDependencies) = postProject {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_picture", "src\test_grabbag\picture\test_picture.vcproj", "{4CEFBC8F-C215-11DB-8314-0800200C9A66}" ProjectSection(ProjectDependencies) = postProject {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} {4CEFBC81-C215-11DB-8314-0800200C9A66} = {4CEFBC81-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_seeking", "src\test_seeking\test_seeking.vcproj", "{4CEFBC90-C215-11DB-8314-0800200C9A66}" ProjectSection(ProjectDependencies) = postProject {4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66} - {4CEFBE02-C215-11DB-8314-0800200C9A66} = {4CEFBE02-C215-11DB-8314-0800200C9A66} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_streams", "src\test_streams\test_streams.vcproj", "{4CEFBC91-C215-11DB-8314-0800200C9A66}" diff --git a/Makefile.deps b/Makefile.deps index c262daae..d2dc4401 100644 --- a/Makefile.deps +++ b/Makefile.deps @@ -17,15 +17,14 @@ # distribution. ifeq ($(findstring Windows,$(OS)),Windows) # "Windows" is provided by GNU Make's internal $(OS) - LIBFLAC_DEPS = share/win_utf8_io + WIN_DEPS = share/win_utf8_io else - LIBFLAC_DEPS = + WIN_DEPS = endif -libFLAC: $(LIBFLAC_DEPS) -flac: libFLAC share +flac: libFLAC share $(WIN_DEPS) libFLAC++: libFLAC -metaflac: libFLAC share +metaflac: libFLAC share $(WIN_DEPS) plugin_common: libFLAC plugin_xmms: libFLAC plugin_common share: libFLAC @@ -34,7 +33,7 @@ test_libs_common: libFLAC test_libFLAC++: libFLAC libFLAC++ test_libs_common test_libFLAC: libFLAC test_libs_common test_seeking: libFLAC -test_streams: libFLAC -flacdiff: libFLAC libFLAC++ -flactimer: libFLAC libFLAC++ +test_streams: share +flacdiff: libFLAC libFLAC++ $(WIN_DEPS) +flactimer: utils: flacdiff flactimer diff --git a/Makefile.lite b/Makefile.lite index 44534745..6c2a9823 100644 --- a/Makefile.lite +++ b/Makefile.lite @@ -31,7 +31,7 @@ topdir = . -.PHONY: all doc src examples libFLAC libFLAC++ share/win_utf8_io share plugin_common flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer +.PHONY: all doc src examples libFLAC libFLAC++ share plugin_common flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer all: src examples DEFAULT_CONFIG = release @@ -52,7 +52,7 @@ doc: src examples: (cd $@ && $(MAKE) -f Makefile.lite $(CONFIG)) -libFLAC libFLAC++ share/win_utf8_io share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++: +libFLAC libFLAC++ share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++: (cd src/$@ && $(MAKE) -f Makefile.lite $(CONFIG)) flacdiff flactimer: diff --git a/examples/c/decode/file/Makefile.lite b/examples/c/decode/file/Makefile.lite index c0b52e3e..c24eeb55 100644 --- a/examples/c/decode/file/Makefile.lite +++ b/examples/c/decode/file/Makefile.lite @@ -31,13 +31,9 @@ INCLUDES = -I$(topdir)/include ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lFLAC $(OGG_LIBS) -lm endif -endif SRCS_C = main.c diff --git a/examples/c/decode/file/example_c_decode_file.vcxproj b/examples/c/decode/file/example_c_decode_file.vcxproj index 3b166640..db14265e 100644 --- a/examples/c/decode/file/example_c_decode_file.vcxproj +++ b/examples/c/decode/file/example_c_decode_file.vcxproj @@ -172,10 +172,6 @@ {4cefbc84-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/examples/c/encode/file/Makefile.lite b/examples/c/encode/file/Makefile.lite index 9bae4b9f..07f147eb 100644 --- a/examples/c/encode/file/Makefile.lite +++ b/examples/c/encode/file/Makefile.lite @@ -31,13 +31,9 @@ INCLUDES = -I$(topdir)/include ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lFLAC $(OGG_LIBS) -lm endif -endif SRCS_C = main.c diff --git a/examples/c/encode/file/example_c_encode_file.vcxproj b/examples/c/encode/file/example_c_encode_file.vcxproj index 60bf39ce..edf464b7 100644 --- a/examples/c/encode/file/example_c_encode_file.vcxproj +++ b/examples/c/encode/file/example_c_encode_file.vcxproj @@ -172,10 +172,6 @@ {4cefbc84-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/examples/cpp/decode/file/Makefile.lite b/examples/cpp/decode/file/Makefile.lite index fe9a31af..b559edc9 100644 --- a/examples/cpp/decode/file/Makefile.lite +++ b/examples/cpp/decode/file/Makefile.lite @@ -31,13 +31,9 @@ INCLUDES = -I$(topdir)/include ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm endif -endif SRCS_CPP = main.cpp diff --git a/examples/cpp/decode/file/example_cpp_decode_file.vcxproj b/examples/cpp/decode/file/example_cpp_decode_file.vcxproj index d105bb4c..6dde67e2 100644 --- a/examples/cpp/decode/file/example_cpp_decode_file.vcxproj +++ b/examples/cpp/decode/file/example_cpp_decode_file.vcxproj @@ -176,10 +176,6 @@ {4cefbc84-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/examples/cpp/encode/file/Makefile.lite b/examples/cpp/encode/file/Makefile.lite index cc5583f8..43a952e8 100644 --- a/examples/cpp/encode/file/Makefile.lite +++ b/examples/cpp/encode/file/Makefile.lite @@ -31,13 +31,9 @@ INCLUDES = -I$(topdir)/include ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm endif -endif SRCS_CPP = main.cpp diff --git a/examples/cpp/encode/file/example_cpp_encode_file.vcxproj b/examples/cpp/encode/file/example_cpp_encode_file.vcxproj index 793f62cd..271b50ac 100644 --- a/examples/cpp/encode/file/example_cpp_encode_file.vcxproj +++ b/examples/cpp/encode/file/example_cpp_encode_file.vcxproj @@ -176,10 +176,6 @@ {4cefbc84-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/include/share/Makefile.am b/include/share/Makefile.am index a6a3ca0f..2d8ca503 100644 --- a/include/share/Makefile.am +++ b/include/share/Makefile.am @@ -14,4 +14,5 @@ EXTRA_DIST = \ replaygain_synthesis.h \ safe_str.h \ utf8.h \ - win_utf8_io.h + win_utf8_io.h \ + windows_unicode_filenames.h diff --git a/include/share/compat.h b/include/share/compat.h index 34d32db4..4332b5c3 100644 --- a/include/share/compat.h +++ b/include/share/compat.h @@ -146,18 +146,19 @@ #ifdef _WIN32 /* All char* strings are in UTF-8 format. Added to support Unicode files on Windows */ -#include "share/win_utf8_io.h" +#include "share/win_utf8_io.h" #define flac_printf printf_utf8 #define flac_fprintf fprintf_utf8 #define flac_vfprintf vfprintf_utf8 -#define flac_fopen fopen_utf8 -#define flac_chmod chmod_utf8 -#define flac_utime utime_utf8 -#define flac_unlink unlink_utf8 -#define flac_rename rename_utf8 -#define flac_stat _stat64_utf8 +#include "share/windows_unicode_filenames.h" +#define flac_fopen flac_internal_fopen_utf8 +#define flac_chmod flac_internal_chmod_utf8 +#define flac_utime flac_internal_utime_utf8 +#define flac_unlink flac_internal_unlink_utf8 +#define flac_rename flac_internal_rename_utf8 +#define flac_stat flac_internal_stat64_utf8 #else diff --git a/include/share/win_utf8_io.h b/include/share/win_utf8_io.h index ba9ad75c..5baefcce 100644 --- a/include/share/win_utf8_io.h +++ b/include/share/win_utf8_io.h @@ -34,15 +34,13 @@ #ifndef flac__win_utf8_io_h #define flac__win_utf8_io_h +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include -#include -#include - size_t strlen_utf8(const char *str); int win_get_console_width(void); diff --git a/src/Makefile.am b/src/Makefile.am index 5941738c..42ec50c0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,8 +25,8 @@ CPPLIBS_DIRS = libFLAC++ test_libFLAC++ endif SUBDIRS = \ - share \ libFLAC \ + share \ flac \ metaflac \ $(XMMS_DIRS) \ diff --git a/src/flac/Makefile.am b/src/flac/Makefile.am index 7103d9d7..117b9134 100644 --- a/src/flac/Makefile.am +++ b/src/flac/Makefile.am @@ -48,6 +48,10 @@ flac_SOURCES = \ utils.h \ vorbiscomment.h +if OS_IS_WINDOWS +win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la +endif + flac_LDADD = \ $(top_builddir)/src/share/utf8/libutf8.la \ $(top_builddir)/src/share/grabbag/libgrabbag.la \ @@ -55,6 +59,7 @@ flac_LDADD = \ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \ $(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \ $(top_builddir)/src/libFLAC/libFLAC.la \ + $(win_utf8_lib) \ @LIBICONV@ \ -lm diff --git a/src/libFLAC++/Makefile.lite b/src/libFLAC++/Makefile.lite index 800d3e7b..6ddd9411 100644 --- a/src/libFLAC++/Makefile.lite +++ b/src/libFLAC++/Makefile.lite @@ -43,16 +43,12 @@ endif ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -lstdc++ else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm -lsupc++ -else ifeq ($(OS),FreeBSD) LIBS = -lFLAC $(OGG_LIBS) -lm -lstdc++ else LIBS = -lFLAC $(OGG_LIBS) -lm -lsupc++ endif endif -endif LIB_NAME = libFLAC++ INCLUDES = -I$(topdir)/include diff --git a/src/libFLAC++/libFLAC++_dynamic.vcxproj b/src/libFLAC++/libFLAC++_dynamic.vcxproj index e79e2dcc..12b4fb0c 100644 --- a/src/libFLAC++/libFLAC++_dynamic.vcxproj +++ b/src/libFLAC++/libFLAC++_dynamic.vcxproj @@ -173,10 +173,6 @@ {4cefbc83-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/src/libFLAC++/libFLAC++_static.vcxproj b/src/libFLAC++/libFLAC++_static.vcxproj index d45f1ee3..21994bd4 100644 --- a/src/libFLAC++/libFLAC++_static.vcxproj +++ b/src/libFLAC++/libFLAC++_static.vcxproj @@ -141,10 +141,6 @@ {4cefbc84-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am index 276e3344..004e1495 100644 --- a/src/libFLAC/Makefile.am +++ b/src/libFLAC/Makefile.am @@ -61,11 +61,7 @@ endif endif endif -if OS_IS_WINDOWS -win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la -endif - -libFLAC_la_LIBADD = $(win_utf8_lib) $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ -lm +libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ -lm SUBDIRS = $(ARCH_SUBDIRS) include . @@ -86,6 +82,10 @@ EXTRA_DIST = \ libFLAC_static.vcxproj.filters \ libFLAC.m4 +if OS_IS_WINDOWS +windows_unicode_compat = windows_unicode_filenames.c +endif + if FLaC__HAS_OGG extra_ogg_sources = \ ogg_decoder_aspect.c \ @@ -124,6 +124,7 @@ libFLAC_sources = \ stream_encoder_intrin_avx2.c \ stream_encoder_framing.c \ window.c \ + $(windows_unicode_compat) \ $(extra_ogg_sources) libFLAC_la_SOURCES = $(libFLAC_sources) diff --git a/src/libFLAC/Makefile.lite b/src/libFLAC/Makefile.lite index 722acfba..9fc22451 100644 --- a/src/libFLAC/Makefile.lite +++ b/src/libFLAC/Makefile.lite @@ -37,12 +37,12 @@ topdir = ../.. ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = $(OGG_LIBS) -lm endif + +ifeq ($(findstring Windows,$(OS)),Windows) + WIN_UNICODE_COMPAT = windows_unicode_filenames.c endif LIB_NAME = libFLAC @@ -102,6 +102,7 @@ SRCS_C = \ stream_encoder_intrin_avx2.c \ stream_encoder_framing.c \ window.c \ + $(WIN_UNICODE_COMPAT) \ $(OGG_SRCS) include $(topdir)/build/lib.mk diff --git a/src/libFLAC/libFLAC_dynamic.vcproj b/src/libFLAC/libFLAC_dynamic.vcproj index debbb733..cd32deee 100644 --- a/src/libFLAC/libFLAC_dynamic.vcproj +++ b/src/libFLAC/libFLAC_dynamic.vcproj @@ -186,11 +186,11 @@ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > + + + + @@ -415,6 +423,14 @@ RelativePath="..\..\include\FLAC\callback.h" > + + + + @@ -423,6 +439,10 @@ RelativePath="..\..\include\FLAC\format.h" > + + @@ -431,6 +451,14 @@ RelativePath="..\..\include\FLAC\ordinals.h" > + + + + @@ -439,6 +467,10 @@ RelativePath="..\..\include\FLAC\stream_encoder.h" > + + + + + + + + + @@ -250,6 +257,7 @@ + @@ -313,12 +321,6 @@ true - - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - - diff --git a/src/libFLAC/libFLAC_dynamic.vcxproj.filters b/src/libFLAC/libFLAC_dynamic.vcxproj.filters index fa79a8dc..875c0216 100644 --- a/src/libFLAC/libFLAC_dynamic.vcxproj.filters +++ b/src/libFLAC/libFLAC_dynamic.vcxproj.filters @@ -113,6 +113,27 @@ Public Header Files + + Public Header Files + + + Public Header Files + + + Public Header Files + + + Public Header Files + + + Public Header Files + + + Public Header Files + + + Public Header Files + @@ -205,6 +226,9 @@ Source Files + + Source Files + diff --git a/src/libFLAC/libFLAC_static.vcproj b/src/libFLAC/libFLAC_static.vcproj index 32c80a78..42213b03 100644 --- a/src/libFLAC/libFLAC_static.vcproj +++ b/src/libFLAC/libFLAC_static.vcproj @@ -159,11 +159,11 @@ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > + + @@ -270,6 +274,14 @@ RelativePath="..\..\include\FLAC\callback.h" > + + + + @@ -278,6 +290,10 @@ RelativePath="..\..\include\FLAC\format.h" > + + @@ -286,6 +302,14 @@ RelativePath="..\..\include\FLAC\ordinals.h" > + + + + @@ -294,6 +318,10 @@ RelativePath="..\..\include\FLAC\stream_encoder.h" > + + + + + + + + + + + @@ -210,6 +217,7 @@ + @@ -273,11 +281,6 @@ true - - - {4cefbe02-c215-11db-8314-0800200c9a66} - - diff --git a/src/libFLAC/libFLAC_static.vcxproj.filters b/src/libFLAC/libFLAC_static.vcxproj.filters index bc99bf3b..a600678a 100644 --- a/src/libFLAC/libFLAC_static.vcxproj.filters +++ b/src/libFLAC/libFLAC_static.vcxproj.filters @@ -113,6 +113,27 @@ Public Header Files + + Public Header Files + + + Public Header Files + + + Public Header Files + + + Public Header Files + + + Public Header Files + + + Public Header Files + + + Public Header Files + @@ -205,6 +226,9 @@ Source Files + + Source Files + diff --git a/src/metaflac/Makefile.am b/src/metaflac/Makefile.am index e3355ce8..5dba9b84 100644 --- a/src/metaflac/Makefile.am +++ b/src/metaflac/Makefile.am @@ -44,12 +44,17 @@ metaflac_SOURCES = \ utils.h metaflac_LDFLAGS = $(AM_LDFLAGS) +if OS_IS_WINDOWS +win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la +endif + metaflac_LDADD = \ $(top_builddir)/src/share/grabbag/libgrabbag.la \ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \ $(top_builddir)/src/share/getopt/libgetopt.la \ $(top_builddir)/src/share/utf8/libutf8.la \ $(top_builddir)/src/libFLAC/libFLAC.la \ + $(win_utf8_lib) \ @LIBICONV@ CLEANFILES = metaflac.exe diff --git a/src/plugin_common/Makefile.lite b/src/plugin_common/Makefile.lite index 7d9683ad..673f1db5 100644 --- a/src/plugin_common/Makefile.lite +++ b/src/plugin_common/Makefile.lite @@ -27,13 +27,9 @@ INCLUDES = -I$(topdir)/include -I$(HOME)/local/include ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm endif -endif SRCS_C = \ charset.c \ diff --git a/src/plugin_xmms/Makefile.lite b/src/plugin_xmms/Makefile.lite index ec101a3d..b713f6df 100644 --- a/src/plugin_xmms/Makefile.lite +++ b/src/plugin_xmms/Makefile.lite @@ -28,13 +28,9 @@ INCLUDES = -I./include -I$(topdir)/include -I.. $(shell xmms-config --cflags) # refer to the static libs explicitly ifeq ($(OS),Darwin) LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm -lstdc++ -lz -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(libdir)/libwin_utf8_io.a $(OGG_LIBS) -lm -lsupc++ -lz else LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_LIBS) -lm -lsupc++ -lz endif -endif SRCS_C = \ charset.c \ diff --git a/src/share/Makefile.am b/src/share/Makefile.am index 93628238..cd44ed3d 100644 --- a/src/share/Makefile.am +++ b/src/share/Makefile.am @@ -63,12 +63,12 @@ noinst_LTLIBRARIES = \ if OS_IS_WINDOWS win_utf8_io_libwin_utf8_io_la_SOURCES = win_utf8_io/win_utf8_io.c libwin_utf8_io = win_utf8_io/libwin_utf8_io.la +win_utf8_io_libwin_utf8_io_la_LIBADD = $(top_builddir)/src/libFLAC/libFLAC.la -lm else win_utf8_io_libwin_utf8_io_la_SOURCES = libwin_utf8_io = endif - getopt_libgetopt_la_SOURCES = getopt/getopt.c getopt/getopt1.c grabbag_libgrabbag_la_SOURCES = \ diff --git a/src/share/grabbag/Makefile.lite b/src/share/grabbag/Makefile.lite index 4eac54be..6c8ff6c7 100644 --- a/src/share/grabbag/Makefile.lite +++ b/src/share/grabbag/Makefile.lite @@ -1,3 +1,5 @@ +# grabbag - Convenience lib for various routines common to several tools + # # GNU makefile # @@ -7,13 +9,9 @@ libdir = $(topdir)/objs/$(BUILD)/lib ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lFLAC -lreplaygain_analysis -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lFLAC -lreplaygain_analysis $(OGG_LIBS) -lm endif -endif LIB_NAME = libgrabbag INCLUDES = -I$(topdir)/include diff --git a/src/share/grabbag/grabbag_static.vcxproj b/src/share/grabbag/grabbag_static.vcxproj index 8ae6a28f..8e7b6fde 100644 --- a/src/share/grabbag/grabbag_static.vcxproj +++ b/src/share/grabbag/grabbag_static.vcxproj @@ -154,10 +154,6 @@ {4cefbc89-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/src/share/win_utf8_io/Makefile.lite b/src/share/win_utf8_io/Makefile.lite index b941b079..15492669 100644 --- a/src/share/win_utf8_io/Makefile.lite +++ b/src/share/win_utf8_io/Makefile.lite @@ -4,6 +4,12 @@ topdir = ../../.. +ifeq ($(OS),Darwin) + EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm +else + LIBS = -lFLAC $(OGG_LIBS) -lm +endif + LIB_NAME = libwin_utf8_io INCLUDES = -I$(topdir)/include diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c index 6b5c56c3..6cb40332 100644 --- a/src/share/win_utf8_io/win_utf8_io.c +++ b/src/share/win_utf8_io/win_utf8_io.c @@ -103,8 +103,6 @@ static wchar_t *wchar_from_utf8(const char *str) return widestr; } -static void set_filename_utf8(int b); - /* retrieve WCHAR commandline, expand wildcards and convert everything to UTF-8 */ int get_utf8_argv(int *argc, char ***argv) { @@ -144,7 +142,7 @@ int get_utf8_argv(int *argc, char ***argv) FreeLibrary(handle); /* do not free it when wargv or wenv are still in use */ if (ret == 0) { - set_filename_utf8(1); + flac_set_utf8_filenames(true); *argc = wargc; *argv = utf8argv; } else { @@ -258,140 +256,3 @@ int vfprintf_utf8(FILE *stream, const char *format, va_list argptr) return ret; } - -/* file functions */ - -static int utf8_filename = 0; - -static void set_filename_utf8(int b) -{ - utf8_filename = b ? 1: 0; -} - -FILE *fopen_utf8(const char *filename, const char *mode) -{ - if (0 == utf8_filename) { - return fopen(filename, mode); - } else { - wchar_t *wname = NULL; - wchar_t *wmode = NULL; - FILE *f = NULL; - - do { - if (!(wname = wchar_from_utf8(filename))) break; - if (!(wmode = wchar_from_utf8(mode))) break; - f = _wfopen(wname, wmode); - } while(0); - - free(wname); - free(wmode); - - return f; - } -} - -int _stat64_utf8(const char *path, struct __stat64 *buffer) -{ - if (0 == utf8_filename) { - return _stat64(path, buffer); - } else { - wchar_t *wpath; - int ret; - - if (!(wpath = wchar_from_utf8(path))) return -1; - ret = _wstat64(wpath, buffer); - free(wpath); - - return ret; - } -} - -int chmod_utf8(const char *filename, int pmode) -{ - if (0 == utf8_filename) { - return _chmod(filename, pmode); - } else { - wchar_t *wname; - int ret; - - if (!(wname = wchar_from_utf8(filename))) return -1; - ret = _wchmod(wname, pmode); - free(wname); - - return ret; - } -} - -int utime_utf8(const char *filename, struct utimbuf *times) -{ - if (0 == utf8_filename) { - return utime(filename, times); - } else { - wchar_t *wname; - struct __utimbuf64 ut; - int ret; - - if (!(wname = wchar_from_utf8(filename))) return -1; - ut.actime = times->actime; - ut.modtime = times->modtime; - ret = _wutime64(wname, &ut); - free(wname); - - return ret; - } -} - -int unlink_utf8(const char *filename) -{ - if (0 == utf8_filename) { - return _unlink(filename); - } else { - wchar_t *wname; - int ret; - - if (!(wname = wchar_from_utf8(filename))) return -1; - ret = _wunlink(wname); - free(wname); - - return ret; - } -} - -int rename_utf8(const char *oldname, const char *newname) -{ - if (0 == utf8_filename) { - return rename(oldname, newname); - } else { - wchar_t *wold = NULL; - wchar_t *wnew = NULL; - int ret = -1; - - do { - if (!(wold = wchar_from_utf8(oldname))) break; - if (!(wnew = wchar_from_utf8(newname))) break; - ret = _wrename(wold, wnew); - } while(0); - - free(wold); - free(wnew); - - return ret; - } -} - -HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) -{ - if (0 == utf8_filename) { - return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); - } else { - wchar_t *wname; - HANDLE handle = INVALID_HANDLE_VALUE; - - if ((wname = wchar_from_utf8(lpFileName)) != NULL) { - handle = CreateFileW(wname, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); - free(wname); - } - - return handle; - } -} diff --git a/src/test_grabbag/cuesheet/Makefile.lite b/src/test_grabbag/cuesheet/Makefile.lite index 9fe694da..5e77fea5 100644 --- a/src/test_grabbag/cuesheet/Makefile.lite +++ b/src/test_grabbag/cuesheet/Makefile.lite @@ -31,13 +31,9 @@ INCLUDES = -I./include -I$(topdir)/include ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm endif -endif SRCS_C = \ main.c diff --git a/src/test_grabbag/cuesheet/test_cuesheet.vcxproj b/src/test_grabbag/cuesheet/test_cuesheet.vcxproj index eef87539..301fa154 100644 --- a/src/test_grabbag/cuesheet/test_cuesheet.vcxproj +++ b/src/test_grabbag/cuesheet/test_cuesheet.vcxproj @@ -171,10 +171,6 @@ {4cefbc81-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/src/test_grabbag/picture/Makefile.am b/src/test_grabbag/picture/Makefile.am index 135a3361..fca16197 100644 --- a/src/test_grabbag/picture/Makefile.am +++ b/src/test_grabbag/picture/Makefile.am @@ -29,6 +29,7 @@ test_picture_SOURCES = \ test_picture_LDADD = \ $(top_builddir)/src/share/grabbag/libgrabbag.la \ + $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \ $(top_builddir)/src/libFLAC/libFLAC.la CLEANFILES = test_picture.exe diff --git a/src/test_grabbag/picture/Makefile.lite b/src/test_grabbag/picture/Makefile.lite index 10ebfe07..fe57b4c3 100644 --- a/src/test_grabbag/picture/Makefile.lite +++ b/src/test_grabbag/picture/Makefile.lite @@ -31,13 +31,9 @@ INCLUDES = -I./include -I$(topdir)/include ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm endif -endif SRCS_C = \ main.c diff --git a/src/test_grabbag/picture/test_picture.vcxproj b/src/test_grabbag/picture/test_picture.vcxproj index 3a6da466..588c19e6 100644 --- a/src/test_grabbag/picture/test_picture.vcxproj +++ b/src/test_grabbag/picture/test_picture.vcxproj @@ -171,10 +171,6 @@ {4cefbc81-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/src/test_libFLAC++/Makefile.lite b/src/test_libFLAC++/Makefile.lite index 69d1a84c..f520a6e7 100644 --- a/src/test_libFLAC++/Makefile.lite +++ b/src/test_libFLAC++/Makefile.lite @@ -31,13 +31,9 @@ INCLUDES = -I$(topdir)/include ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC $(OGG_LIBS) -lm endif -endif SRCS_CPP = \ decoders.cpp \ diff --git a/src/test_libFLAC++/test_libFLAC++.vcxproj b/src/test_libFLAC++/test_libFLAC++.vcxproj index dfa7e81e..c356e626 100644 --- a/src/test_libFLAC++/test_libFLAC++.vcxproj +++ b/src/test_libFLAC++/test_libFLAC++.vcxproj @@ -185,10 +185,6 @@ {4cefbc81-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - {4cefbc8e-c215-11db-8314-0800200c9a66} false diff --git a/src/test_libFLAC/Makefile.am b/src/test_libFLAC/Makefile.am index b1bab029..152b8cbe 100644 --- a/src/test_libFLAC/Makefile.am +++ b/src/test_libFLAC/Makefile.am @@ -26,16 +26,12 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -I$( noinst_PROGRAMS = test_libFLAC -if OS_IS_WINDOWS -win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la -endif - test_libFLAC_LDADD = \ $(top_builddir)/src/share/grabbag/libgrabbag.la \ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \ $(top_builddir)/src/test_libs_common/libtest_libs_common.la \ - $(top_builddir)/src/libFLAC/libFLAC-static.la \ - $(win_utf8_lib) @OGG_LIBS@ \ + $(top_builddir)/src/libFLAC/libFLAC.la \ + @OGG_LIBS@ \ -lm test_libFLAC_SOURCES = \ diff --git a/src/test_libFLAC/Makefile.lite b/src/test_libFLAC/Makefile.lite index e95beb3b..2e1f816c 100644 --- a/src/test_libFLAC/Makefile.lite +++ b/src/test_libFLAC/Makefile.lite @@ -31,13 +31,9 @@ INCLUDES = -I../libFLAC/include -I$(topdir)/include ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC $(OGG_LIBS) -lm endif -endif SRCS_C = \ bitwriter.c \ diff --git a/src/test_libFLAC/test_libFLAC.vcxproj b/src/test_libFLAC/test_libFLAC.vcxproj index 31517695..052c9d99 100644 --- a/src/test_libFLAC/test_libFLAC.vcxproj +++ b/src/test_libFLAC/test_libFLAC.vcxproj @@ -194,10 +194,6 @@ {4cefbc81-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - {4cefbc8e-c215-11db-8314-0800200c9a66} false diff --git a/src/test_libs_common/Makefile.am b/src/test_libs_common/Makefile.am index 0b77388c..e585e1a9 100644 --- a/src/test_libs_common/Makefile.am +++ b/src/test_libs_common/Makefile.am @@ -24,6 +24,8 @@ libtest_libs_common_la_SOURCES = \ file_utils_flac.c \ metadata_utils.c +libtest_libs_common_LDADD = $(top_builddir)/src/libFLAC/libFLAC.la + EXTRA_DIST = \ Makefile.lite \ README \ diff --git a/src/test_libs_common/Makefile.lite b/src/test_libs_common/Makefile.lite index abf2f1e9..cb970a6e 100644 --- a/src/test_libs_common/Makefile.lite +++ b/src/test_libs_common/Makefile.lite @@ -27,13 +27,9 @@ LIB_NAME = libtest_libs_common ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lFLAC $(OGG_LIBS) -lm endif -endif INCLUDES = -I$(topdir)/include diff --git a/src/test_libs_common/test_libs_common_static.vcxproj b/src/test_libs_common/test_libs_common_static.vcxproj index 1e41c7b2..812c8c38 100644 --- a/src/test_libs_common/test_libs_common_static.vcxproj +++ b/src/test_libs_common/test_libs_common_static.vcxproj @@ -137,10 +137,6 @@ {4cefbc84-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/src/test_seeking/Makefile.lite b/src/test_seeking/Makefile.lite index 5ada17d6..b5fdc727 100644 --- a/src/test_seeking/Makefile.lite +++ b/src/test_seeking/Makefile.lite @@ -31,13 +31,9 @@ INCLUDES = -I../libFLAC/include -I$(topdir)/include ifeq ($(OS),Darwin) EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm else LIBS = -lFLAC $(OGG_LIBS) -lm endif -endif SRCS_C = \ main.c diff --git a/src/test_seeking/test_seeking.vcxproj b/src/test_seeking/test_seeking.vcxproj index 71c3cff7..cc20367e 100644 --- a/src/test_seeking/test_seeking.vcxproj +++ b/src/test_seeking/test_seeking.vcxproj @@ -172,10 +172,6 @@ {4cefbc84-c215-11db-8314-0800200c9a66} false - - {4cefbe02-c215-11db-8314-0800200c9a66} - false - diff --git a/src/utils/flactimer/Makefile.lite b/src/utils/flactimer/Makefile.lite index 1eb0759a..106e7b29 100644 --- a/src/utils/flactimer/Makefile.lite +++ b/src/utils/flactimer/Makefile.lite @@ -28,13 +28,9 @@ PROGRAM_NAME = flactimer INCLUDES = -I$(topdir)/include ifeq ($(OS),Darwin) - EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm + EXPLICIT_LIBS = -lm else -ifeq ($(findstring Windows,$(OS)),Windows) - LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm -else - LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm -endif + LIBS = -lm endif SRCS_CPP = \