blob: 4cb21d9bd74df393a1bc356e66b99e3b8695b004 [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
25 decoders, and a metadata interface, licensed under the GNU
26 Lesser General Public License (LGPL)
27 * `libFLAC++', a C++ object wrapper library around libFLAC
28 * `flac', a command-line program for encoding and decoding files,
29 licensed under the GNU General public License (GPL)
30 * `metaflac', a command-line program for editing FLAC metadata,
31 licensed under the GPL
32 * player plugins for XMMS and Winamp, licensed under the GPL
33 * documentation, licensed under the GNU Free Documentation License.
Josh Coalson6b05bc52001-06-08 00:13:21 +000034
Josh Coalson310b9ec2002-07-31 06:39:21 +000035===============================================================================
36FLAC - 1.0.3 - Contents
37===============================================================================
38
39- Introduction
40- Building in a GNU environment
41- Building with Makefile.lite
42- Building with MSVC
43- Building on Mac OS X
44- Note to embedded developers
45
46
47===============================================================================
48Introduction
49===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000050
Josh Coalson6b05bc52001-06-08 00:13:21 +000051This is the source release for the FLAC project. See
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000052
53 doc/index.html
54
55for full documentation.
56
57A brief description of the directory tree:
58
Josh Coalson917df862002-07-03 07:39:05 +000059 doc/ the HTML documentation
60 flac.pbproj/ the Mac OS X Project Builder project
61 include/ public include files for libFLAC and libFLAC++
62 man/ the man page for `flac'
63 src/ the source code and private headers
64 test/ the test scripts
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000065
66
Josh Coalson310b9ec2002-07-31 06:39:21 +000067===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000068Building in a GNU environment
Josh Coalson310b9ec2002-07-31 06:39:21 +000069===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000070
Josh Coalson172ac002001-10-31 18:30:19 +000071FLAC uses autoconf and libtool for configuring and building.
72Better documentation for these will be forthcoming, but in
73general, this should work:
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000074
Josh Coalson172ac002001-10-31 18:30:19 +000075./configure && make && make install
Josh Coalsonbfe42f12000-12-22 22:42:25 +000076
Josh Coalson917df862002-07-03 07:39:05 +000077NOTE: Despite our best efforts it's entirely possible to have
78problems when using older versions of autoconf, automake, or
79libtool. If you have the latest versions and still can't get it
80to work, see the next section on Makefile.lite.
Josh Coalson04032562001-07-20 23:43:15 +000081
Josh Coalson3643db32001-07-18 00:23:06 +000082There are a few FLAC-specific arguments you can give to
83`configure':
84
85--enable-debug : Builds everything with debug symbols and some
86extra (and more verbose) error checking.
87
88--disable-asm-optimizations : Disables the compilation of the
89assembly routines. Many routines have assembly versions for
90speed and `configure' is pretty good about knowing what is
91supported, but you can use this option to build only from the
92C sources.
93
Josh Coalsone3268482001-12-04 06:46:12 +000094--enable-sse : If you are building for an x86 CPU that supports
Josh Coalson3643db32001-07-18 00:23:06 +000095SSE instructions, you can enable some of the faster routines
96if your operating system also supports SSE instructions. flac
97can tell if the CPU supports the instructions but currently has
98no way to test if the OS does, so if it does, you must pass
99this argument to configure to use the SSE routines. If flac
100crashes when built with this option you will have to go back and
Josh Coalsone3268482001-12-04 06:46:12 +0000101configure without --enable-sse. Note that
102--disable-asm-optimizations implies --disable-sse.
Josh Coalson9e6efb62001-05-29 18:48:42 +0000103
Josh Coalsone3268482001-12-04 06:46:12 +0000104--enable-3dnow : If you are building for an AMD CPU which has 3DNOW!
Josh Coalsonc69f8782001-11-13 23:08:22 +0000105support, you can use this flag to enable some assembly routines
106which use 3DNOW! instructions. There have been some reports that
107they may cause flac to crash, which is why it is not turned on
Josh Coalson7140a1c2001-11-13 23:11:51 +0000108by default. Note that --disable-asm-optimizations overrides
Josh Coalsone3268482001-12-04 06:46:12 +0000109--enable-3dnow.
Josh Coalsonc69f8782001-11-13 23:08:22 +0000110
Josh Coalsonbb7f6b92000-12-10 04:09:52 +0000111
Josh Coalson310b9ec2002-07-31 06:39:21 +0000112===============================================================================
Josh Coalson04032562001-07-20 23:43:15 +0000113Building with Makefile.lite
Josh Coalson310b9ec2002-07-31 06:39:21 +0000114===============================================================================
Josh Coalson04032562001-07-20 23:43:15 +0000115
116There is a more lightweight build system for do-it-yourself-ers.
117It is also useful if configure isn't working, which may be the
118case since lately we've had some problems with different versions
119of automake and libtool. The Makefile.lite system should work
Josh Coalsonb83801e2002-03-13 04:11:05 +0000120on Gnu systems with few or no adjustments.
Josh Coalson04032562001-07-20 23:43:15 +0000121
122From the top level just 'make -f Makefile.lite'. You can
123specify zero or one optional target from 'release', 'debug',
124'test', or 'clean'. The default is 'release'. There is no
125'install' target but everything you need will end up in the
126obj/ directory.
127
128If you are not on an x86 system or you don't have nasm, you
129may have to change the DEFINES in src/libFLAC/Makefile.lite. If
130you don't have nasm, remove -DFLAC__HAS_NASM. If your target is
131not an x86, change -DFLAC__CPU_IA32 to -DFLAC__CPU_UNKNOWN.
132
133
Josh Coalson310b9ec2002-07-31 06:39:21 +0000134===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +0000135Building with MSVC
Josh Coalson310b9ec2002-07-31 06:39:21 +0000136===============================================================================
Josh Coalsonbb7f6b92000-12-10 04:09:52 +0000137
138There is no overall make system for MSVC but the individual
139source directories with a 'Makefile.vc' file in them allow
Josh Coalson9e6efb62001-05-29 18:48:42 +0000140building with MSVC. Just 'nmake /f Makefile.vc'. Currently
141the Makefile.vc for libFLAC is hardcoded to use nasm. If
142you don't have nasm, or don't want any assembly optimizations,
Josh Coalsonb83801e2002-03-13 04:11:05 +0000143edit the makefile, adding '/D FLAC__NO_ASM', and delete the
Josh Coalsonbc869502002-06-14 06:36:16 +0000144rules which compile the .nasm files.
Josh Coalson5676eb12001-11-09 19:23:50 +0000145
146
Josh Coalson310b9ec2002-07-31 06:39:21 +0000147===============================================================================
Josh Coalson5676eb12001-11-09 19:23:50 +0000148Building on Mac OS X
Josh Coalson310b9ec2002-07-31 06:39:21 +0000149===============================================================================
Josh Coalson5676eb12001-11-09 19:23:50 +0000150
Josh Coalsonb83801e2002-03-13 04:11:05 +0000151If you have Fink, the Gnu flow above should work. Otherwise,
152there is a Project Builder project in the top-level source
Josh Coalson5676eb12001-11-09 19:23:50 +0000153directory to build libFLAC and the command-line utilities on
154Mac OS X. In a terminal, cd to the top-level directory (the
155one that contains this README file) and type:
156
157 pbxbuild -alltargets
158
Josh Coalsonb83801e2002-03-13 04:11:05 +0000159This will create everything and leave it in the build/ directory.
160Don't worry about the rest of the stuff that is in build/ or
Josh Coalson5676eb12001-11-09 19:23:50 +0000161the stuff that was already there before building.
162
163There currently is no install procedure; you will have to
164manually copy the tools to wherever you need them.
Josh Coalson310b9ec2002-07-31 06:39:21 +0000165
166
167===============================================================================
168Note to embedded developers
169===============================================================================
170
171libFLAC has grown larger over time as more functionality has been
172included, but much of it may be unnecessary for a particular embedded
173implementation. Unused parts may be pruned by some simple editing of
174configure.in and src/libFLAC/Makefile.am; the following dependency
175graph shows which modules may be pruned without breaking things
176further down:
177
178file_encoder.h
179 stream_encoder.h
180 format.h
181
182file_decoder.h
183 seekable_stream_decoder.h
184 stream_decoder.h
185 format.h
186
187metadata.h
188 format.h
189
190There is a section dedicated to embedded use in the libFLAC API
191HTML documentation (see doc/html/api/index.html).