blob: 09492676ec4f530a8a96310dac5d9ff86350bed0 [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 Coalson172ac002001-10-31 18:30:19 +000081./configure && make && make install
Josh Coalsonbfe42f12000-12-22 22:42:25 +000082
Josh Coalson917df862002-07-03 07:39:05 +000083NOTE: Despite our best efforts it's entirely possible to have
84problems when using older versions of autoconf, automake, or
85libtool. If you have the latest versions and still can't get it
86to work, see the next section on Makefile.lite.
Josh Coalson04032562001-07-20 23:43:15 +000087
Josh Coalson3643db32001-07-18 00:23:06 +000088There are a few FLAC-specific arguments you can give to
89`configure':
90
91--enable-debug : Builds everything with debug symbols and some
92extra (and more verbose) error checking.
93
94--disable-asm-optimizations : Disables the compilation of the
95assembly routines. Many routines have assembly versions for
96speed and `configure' is pretty good about knowing what is
97supported, but you can use this option to build only from the
98C sources.
99
Josh Coalsone3268482001-12-04 06:46:12 +0000100--enable-sse : If you are building for an x86 CPU that supports
Josh Coalson3643db32001-07-18 00:23:06 +0000101SSE instructions, you can enable some of the faster routines
102if your operating system also supports SSE instructions. flac
103can tell if the CPU supports the instructions but currently has
104no way to test if the OS does, so if it does, you must pass
105this argument to configure to use the SSE routines. If flac
106crashes when built with this option you will have to go back and
Josh Coalsone3268482001-12-04 06:46:12 +0000107configure without --enable-sse. Note that
108--disable-asm-optimizations implies --disable-sse.
Josh Coalson9e6efb62001-05-29 18:48:42 +0000109
Josh Coalsone3268482001-12-04 06:46:12 +0000110--enable-3dnow : If you are building for an AMD CPU which has 3DNOW!
Josh Coalsonc69f8782001-11-13 23:08:22 +0000111support, you can use this flag to enable some assembly routines
112which use 3DNOW! instructions. There have been some reports that
113they may cause flac to crash, which is why it is not turned on
Josh Coalson7140a1c2001-11-13 23:11:51 +0000114by default. Note that --disable-asm-optimizations overrides
Josh Coalsone3268482001-12-04 06:46:12 +0000115--enable-3dnow.
Josh Coalsonc69f8782001-11-13 23:08:22 +0000116
Josh Coalsonbb7f6b92000-12-10 04:09:52 +0000117
Josh Coalson310b9ec2002-07-31 06:39:21 +0000118===============================================================================
Josh Coalson04032562001-07-20 23:43:15 +0000119Building with Makefile.lite
Josh Coalson310b9ec2002-07-31 06:39:21 +0000120===============================================================================
Josh Coalson04032562001-07-20 23:43:15 +0000121
122There is a more lightweight build system for do-it-yourself-ers.
123It is also useful if configure isn't working, which may be the
124case since lately we've had some problems with different versions
125of automake and libtool. The Makefile.lite system should work
Josh Coalsonb83801e2002-03-13 04:11:05 +0000126on Gnu systems with few or no adjustments.
Josh Coalson04032562001-07-20 23:43:15 +0000127
128From the top level just 'make -f Makefile.lite'. You can
129specify zero or one optional target from 'release', 'debug',
130'test', or 'clean'. The default is 'release'. There is no
131'install' target but everything you need will end up in the
132obj/ directory.
133
134If you are not on an x86 system or you don't have nasm, you
135may have to change the DEFINES in src/libFLAC/Makefile.lite. If
136you don't have nasm, remove -DFLAC__HAS_NASM. If your target is
137not an x86, change -DFLAC__CPU_IA32 to -DFLAC__CPU_UNKNOWN.
138
139
Josh Coalson310b9ec2002-07-31 06:39:21 +0000140===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +0000141Building with MSVC
Josh Coalson310b9ec2002-07-31 06:39:21 +0000142===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +0000143
144There is no overall make system for MSVC but the individual
145source directories with a 'Makefile.vc' file in them allow
Josh Coalson9e6efb62001-05-29 18:48:42 +0000146building with MSVC. Just 'nmake /f Makefile.vc'. Currently
147the Makefile.vc for libFLAC is hardcoded to use nasm. If
148you don't have nasm, or don't want any assembly optimizations,
Josh Coalsonb83801e2002-03-13 04:11:05 +0000149edit the makefile, adding '/D FLAC__NO_ASM', and delete the
Josh Coalsonbc869502002-06-14 06:36:16 +0000150rules which compile the .nasm files.
Josh Coalson5676eb12001-11-09 19:23:50 +0000151
152
Josh Coalson310b9ec2002-07-31 06:39:21 +0000153===============================================================================
Josh Coalson5676eb12001-11-09 19:23:50 +0000154Building on Mac OS X
Josh Coalson310b9ec2002-07-31 06:39:21 +0000155===============================================================================
Josh Coalson5676eb12001-11-09 19:23:50 +0000156
Josh Coalsonb83801e2002-03-13 04:11:05 +0000157If you have Fink, the Gnu flow above should work. Otherwise,
158there is a Project Builder project in the top-level source
Josh Coalson5676eb12001-11-09 19:23:50 +0000159directory to build libFLAC and the command-line utilities on
160Mac OS X. In a terminal, cd to the top-level directory (the
161one that contains this README file) and type:
162
163 pbxbuild -alltargets
164
Josh Coalsonb83801e2002-03-13 04:11:05 +0000165This will create everything and leave it in the build/ directory.
166Don't worry about the rest of the stuff that is in build/ or
Josh Coalson5676eb12001-11-09 19:23:50 +0000167the stuff that was already there before building.
168
169There currently is no install procedure; you will have to
170manually copy the tools to wherever you need them.
Josh Coalson310b9ec2002-07-31 06:39:21 +0000171
172
173===============================================================================
174Note to embedded developers
175===============================================================================
176
177libFLAC has grown larger over time as more functionality has been
178included, but much of it may be unnecessary for a particular embedded
179implementation. Unused parts may be pruned by some simple editing of
180configure.in and src/libFLAC/Makefile.am; the following dependency
181graph shows which modules may be pruned without breaking things
182further down:
183
184file_encoder.h
185 stream_encoder.h
186 format.h
187
188file_decoder.h
189 seekable_stream_decoder.h
190 stream_decoder.h
191 format.h
192
193metadata.h
194 format.h
195
196There is a section dedicated to embedded use in the libFLAC API
197HTML documentation (see doc/html/api/index.html).