Don't attempt to attach failed metadata objects. This also avoids
clobbering the error flag if attaching the objects should succeed.
There may still be problems later, for example calling _delete()
on a possibly null metadata object pointer, but this it at least
and improvement in the compromise between error handling and
readability in C.
Signed-off-by: Ralph Giles <giles@thaumas.net>
Makefile.lite in libs/executables subdirs must include
top level's config.mk to allow variables defined there (OS, PROC)
to be used; otherwise e.g. EXPLICIT_LIBS is not set and link
fails on Darwin.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
rplaces
OutputDirectory="..\..\..\..\objs\debug\bin"
with
OutputDirectory="$(SolutionDir)objs\$(ConfigurationName)\bin
and so on.
Rmoves
OutputFile="..\..\objs\debug\lib\$(ProjectName).lib
when possible.
Also, in the current version "Whole program optimization" compiler option
is set, but the corresponding linker option isn't. From MSDN:
"If you do not explicitly specify /LTCG when you pass /GL or MSIL modules
to the linker, the linker eventually detects this and restarts the link
by using /LTCG. Explicitly specify /LTCG when you pass /GL and MSIL modules
to the linker for the fastest possible build performance."
So /LTCG option was added too.
Debug build now uses libogg_static.lib from .\objs\debug\lib folder.
(the dependency for both release and debug is
objs\$(ConfigurationName)\lib\libogg_static.lib)
Patch-from: lvqcl <lvqcl.mail@gmail.com>
The smaller patch makes the utf-8 library use ANSI codepage by
default. When frontends call the "get_utf8_argv" function it
changes Unicode conversion codepage from ANSI to UTF-8.
Patch from Janne Hyvärinen <cse@sci.fi>.
This is a patch to allow building of the project using MSYS, MinGW, and MinGW-w64 with the following invocation:
make -f Makefile.lite libFLAC libFLAC++ flac metaflac test_libs_common test_libFLAC test_libFLAC++ test_grabbag test_seeking test_streams utils examples
This patch addresses eight points:
1. `uname -p` in MSYS returns "unknown" so we must use `gcc -dumpmachine` to gain information about the target, 32-bit or 64-bit.
2. MinGW-w64 does not ship with a working iconv.h, so we must disable it under this specific compiler.
3. The code requires <inttypes.h> in a handful of C files, but config.mk did not contain -DHAVE_INTTYPES_H, which under the full build process (I assume) is added by autoconf.
4. The compiler complained when lround() in lpc.c was static, so it is no longer static.
5. Additional scattered linking directives (and reordering) (particularly FLAC, grabbag, and replaygain_analysis) were necessary to build some of the components.
6. The Makefile.lite build system benefited from some cleanup, particularly by rigorously defining all entries, factoring redundancy, and establishing dependencies. (Some typos were fixed too.)
7. Shared objects on Windows use .dll, not .so. (Added *.dll, *.dylib, and *.exe to .gitignore.)
8. To allow more freedom using Makefile.lite without configure, I added the variables USE_OGG and USE_ICONV which can toggle these two components in the build process.
ex: make -f Makefile.lite examples USE_OGG=0 USE_ICONV=0
These improvements make use of some use-time Makefile variable expansion.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
- INCLUDES is deprecated, and CPPFLAGS is an user-defined
variable, use the proper AM_CPPFLAGS instead
- Remove FLAC__INLINE definition, providing proper
replacement for MSVC compilers.
- Detect if we have C99 's lround and provide a replacement
for windows...