blob: ec29dac20114f30b168dcafbe64ccf43aa579d08 [file] [log] [blame]
Josh Coalson6b05bc52001-06-08 00:13:21 +00001/* FLAC - Free Lossless Audio Codec
Josh Coalson1152f9f2002-01-26 18:05:12 +00002 * Copyright (C) 2001,2002 Josh Coalson
Josh Coalson6b05bc52001-06-08 00:13:21 +00003 *
4 * This program is part of FLAC; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19
20FLAC (http://flac.sourceforge.net/) is an Open Source lossless audio
21codec developed by Josh Coalson.
22
Josh Coalsonbc869502002-06-14 06:36:16 +000023FLAC is comprised of
24 * `libFLAC', a library which implements reference encoders and
Josh Coalson0c3524c2002-08-22 04:21:54 +000025 decoders, and a metadata interface
Josh Coalsonbc869502002-06-14 06:36:16 +000026 * `libFLAC++', a C++ object wrapper library around libFLAC
Josh Coalson0c3524c2002-08-22 04:21:54 +000027 * `libOggFLAC' and `libOggFLAC++', which provide encoders and
28 decoders for FLAC streams in an Ogg container
29 * `flac', a command-line program for encoding and decoding files
30 * `metaflac', a command-line program for editing FLAC metadata
31 * player plugins for XMMS and Winamp
32 * user and API documentation
33
34The libraries (libFLAC, libFLAC++, libOggFLAC, and libOggFLAC++) are
35licensed under the GNU Lesser General Public License (LGPL). All other
36programs and plugins are licensed under the GNU General Public License
37(GPL). The documentation is licensed under the GNU Free Documentation
38License (GFDL).
39
Josh Coalson6b05bc52001-06-08 00:13:21 +000040
Josh Coalson310b9ec2002-07-31 06:39:21 +000041===============================================================================
42FLAC - 1.0.3 - Contents
43===============================================================================
44
45- Introduction
46- Building in a GNU environment
47- Building with Makefile.lite
48- Building with MSVC
49- Building on Mac OS X
50- Note to embedded developers
51
52
53===============================================================================
54Introduction
55===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000056
Josh Coalson6b05bc52001-06-08 00:13:21 +000057This is the source release for the FLAC project. See
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000058
59 doc/index.html
60
61for full documentation.
62
63A brief description of the directory tree:
64
Josh Coalson917df862002-07-03 07:39:05 +000065 doc/ the HTML documentation
66 flac.pbproj/ the Mac OS X Project Builder project
67 include/ public include files for libFLAC and libFLAC++
68 man/ the man page for `flac'
69 src/ the source code and private headers
70 test/ the test scripts
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000071
72
Josh Coalson310b9ec2002-07-31 06:39:21 +000073===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000074Building in a GNU environment
Josh Coalson310b9ec2002-07-31 06:39:21 +000075===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000076
Josh Coalson172ac002001-10-31 18:30:19 +000077FLAC uses autoconf and libtool for configuring and building.
78Better documentation for these will be forthcoming, but in
79general, this should work:
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000080
Josh Coalsonc220cf42002-08-23 06:41:31 +000081./configure && make && make check && make install
82
83The 'make check' step is optional; omit it to skip all the tests,
84which can take several hours.
Josh Coalsonbfe42f12000-12-22 22:42:25 +000085
Josh Coalson917df862002-07-03 07:39:05 +000086NOTE: Despite our best efforts it's entirely possible to have
87problems when using older versions of autoconf, automake, or
88libtool. If you have the latest versions and still can't get it
89to work, see the next section on Makefile.lite.
Josh Coalson04032562001-07-20 23:43:15 +000090
Josh Coalson3643db32001-07-18 00:23:06 +000091There are a few FLAC-specific arguments you can give to
92`configure':
93
94--enable-debug : Builds everything with debug symbols and some
95extra (and more verbose) error checking.
96
97--disable-asm-optimizations : Disables the compilation of the
98assembly routines. Many routines have assembly versions for
99speed and `configure' is pretty good about knowing what is
100supported, but you can use this option to build only from the
101C sources.
102
Josh Coalsone3268482001-12-04 06:46:12 +0000103--enable-sse : If you are building for an x86 CPU that supports
Josh Coalson3643db32001-07-18 00:23:06 +0000104SSE instructions, you can enable some of the faster routines
105if your operating system also supports SSE instructions. flac
106can tell if the CPU supports the instructions but currently has
107no way to test if the OS does, so if it does, you must pass
108this argument to configure to use the SSE routines. If flac
109crashes when built with this option you will have to go back and
Josh Coalsone3268482001-12-04 06:46:12 +0000110configure without --enable-sse. Note that
111--disable-asm-optimizations implies --disable-sse.
Josh Coalson9e6efb62001-05-29 18:48:42 +0000112
Josh Coalsone3268482001-12-04 06:46:12 +0000113--enable-3dnow : If you are building for an AMD CPU which has 3DNOW!
Josh Coalsonc69f8782001-11-13 23:08:22 +0000114support, you can use this flag to enable some assembly routines
115which use 3DNOW! instructions. There have been some reports that
116they may cause flac to crash, which is why it is not turned on
Josh Coalson7140a1c2001-11-13 23:11:51 +0000117by default. Note that --disable-asm-optimizations overrides
Josh Coalsone3268482001-12-04 06:46:12 +0000118--enable-3dnow.
Josh Coalsonc69f8782001-11-13 23:08:22 +0000119
Josh Coalsonbb7f6b92000-12-10 04:09:52 +0000120
Josh Coalson310b9ec2002-07-31 06:39:21 +0000121===============================================================================
Josh Coalson04032562001-07-20 23:43:15 +0000122Building with Makefile.lite
Josh Coalson310b9ec2002-07-31 06:39:21 +0000123===============================================================================
Josh Coalson04032562001-07-20 23:43:15 +0000124
125There is a more lightweight build system for do-it-yourself-ers.
126It is also useful if configure isn't working, which may be the
127case since lately we've had some problems with different versions
128of automake and libtool. The Makefile.lite system should work
Josh Coalsonb83801e2002-03-13 04:11:05 +0000129on Gnu systems with few or no adjustments.
Josh Coalson04032562001-07-20 23:43:15 +0000130
131From the top level just 'make -f Makefile.lite'. You can
132specify zero or one optional target from 'release', 'debug',
133'test', or 'clean'. The default is 'release'. There is no
134'install' target but everything you need will end up in the
135obj/ directory.
136
137If you are not on an x86 system or you don't have nasm, you
138may have to change the DEFINES in src/libFLAC/Makefile.lite. If
139you don't have nasm, remove -DFLAC__HAS_NASM. If your target is
140not an x86, change -DFLAC__CPU_IA32 to -DFLAC__CPU_UNKNOWN.
141
142
Josh Coalson310b9ec2002-07-31 06:39:21 +0000143===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +0000144Building with MSVC
Josh Coalson310b9ec2002-07-31 06:39:21 +0000145===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +0000146
147There is no overall make system for MSVC but the individual
148source directories with a 'Makefile.vc' file in them allow
Josh Coalson9e6efb62001-05-29 18:48:42 +0000149building with MSVC. Just 'nmake /f Makefile.vc'. Currently
150the Makefile.vc for libFLAC is hardcoded to use nasm. If
151you don't have nasm, or don't want any assembly optimizations,
Josh Coalsonb83801e2002-03-13 04:11:05 +0000152edit the makefile, adding '/D FLAC__NO_ASM', and delete the
Josh Coalsonbc869502002-06-14 06:36:16 +0000153rules which compile the .nasm files.
Josh Coalson5676eb12001-11-09 19:23:50 +0000154
155
Josh Coalson310b9ec2002-07-31 06:39:21 +0000156===============================================================================
Josh Coalson5676eb12001-11-09 19:23:50 +0000157Building on Mac OS X
Josh Coalson310b9ec2002-07-31 06:39:21 +0000158===============================================================================
Josh Coalson5676eb12001-11-09 19:23:50 +0000159
Josh Coalsonb83801e2002-03-13 04:11:05 +0000160If you have Fink, the Gnu flow above should work. Otherwise,
161there is a Project Builder project in the top-level source
Josh Coalson5676eb12001-11-09 19:23:50 +0000162directory to build libFLAC and the command-line utilities on
163Mac OS X. In a terminal, cd to the top-level directory (the
164one that contains this README file) and type:
165
166 pbxbuild -alltargets
167
Josh Coalsonb83801e2002-03-13 04:11:05 +0000168This will create everything and leave it in the build/ directory.
169Don't worry about the rest of the stuff that is in build/ or
Josh Coalson5676eb12001-11-09 19:23:50 +0000170the stuff that was already there before building.
171
172There currently is no install procedure; you will have to
173manually copy the tools to wherever you need them.
Josh Coalson310b9ec2002-07-31 06:39:21 +0000174
175
176===============================================================================
177Note to embedded developers
178===============================================================================
179
180libFLAC has grown larger over time as more functionality has been
181included, but much of it may be unnecessary for a particular embedded
182implementation. Unused parts may be pruned by some simple editing of
183configure.in and src/libFLAC/Makefile.am; the following dependency
184graph shows which modules may be pruned without breaking things
185further down:
186
187file_encoder.h
188 stream_encoder.h
189 format.h
190
191file_decoder.h
192 seekable_stream_decoder.h
193 stream_decoder.h
194 format.h
195
196metadata.h
197 format.h
198
199There is a section dedicated to embedded use in the libFLAC API
200HTML documentation (see doc/html/api/index.html).