96d081c1c9
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>
33 lines
1.2 KiB
Makefile
33 lines
1.2 KiB
Makefile
# FLAC - Free Lossless Audio Codec
|
|
# Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
|
|
#
|
|
# This file is part the FLAC project. FLAC is comprised of several
|
|
# components distributed under difference licenses. The codec libraries
|
|
# are distributed under Xiph.Org's BSD-like license (see the file
|
|
# COPYING.Xiph in this distribution). All other programs, libraries, and
|
|
# plugins are distributed under the GPL (see COPYING.GPL). The documentation
|
|
# is distributed under the Gnu FDL (see COPYING.FDL). Each file in the
|
|
# FLAC distribution contains at the top the terms under which it may be
|
|
# distributed.
|
|
#
|
|
# Since this particular file is relevant to all components of FLAC,
|
|
# it may be distributed under the Xiph.Org license, which is the least
|
|
# restrictive of those mentioned above. See the file COPYING.Xiph in this
|
|
# distribution.
|
|
|
|
flac: libFLAC share
|
|
libFLAC++: libFLAC
|
|
metaflac: libFLAC share
|
|
plugin_common: libFLAC
|
|
plugin_xmms: libFLAC plugin_common
|
|
share: libFLAC
|
|
test_grabbag: share
|
|
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++
|
|
utils: flacdiff flactimer
|