blob: 112b20bbcf2cac4a79b3e9be4faae24f649f5468 [file] [log] [blame]
Josh Coalson6b05bc52001-06-08 00:13:21 +00001# FLAC - Free Lossless Audio Codec
Josh Coalsonafae69f2003-01-02 07:03:16 +00002# Copyright (C) 2001,2002,2003 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
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000018#
19# GNU Makefile
20#
21# Useful targets
22#
23# all : build all libraries and programs in the default configuration (currently 'release')
24# debug : build all libraries and programs in debug mode
Josh Coalson34c1ea82002-12-04 04:57:33 +000025# valgrind: build all libraries and programs in debug mode, dynamically linked and ready for valgrind
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000026# release : build all libraries and programs in release mode
27# test : run the unit and stream tests
28# clean : remove all non-distro files
29#
30
Josh Coalsoncd0e3222002-10-23 22:08:13 +000031topdir = .
32
Josh Coalson21cd7b82002-12-28 07:03:01 +000033.PHONY: all doc src libFLAC libFLAC++ libOggFLAC libOggFLAC++ share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_libOggFLAC test_libOggFLAC++ test_streams
34all: doc src
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000035
36DEFAULT_CONFIG = release
37
38CONFIG = $(DEFAULT_CONFIG)
39
40debug : CONFIG = debug
Josh Coalson34c1ea82002-12-04 04:57:33 +000041valgrind: CONFIG = valgrind
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000042release : CONFIG = release
43
44debug : all
Josh Coalson34c1ea82002-12-04 04:57:33 +000045valgrind: all
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000046release : all
47
Josh Coalsonef5c2f82002-07-24 06:13:41 +000048doc:
49 (cd $@ ; $(MAKE) -f Makefile.lite)
50
Josh Coalson21cd7b82002-12-28 07:03:01 +000051src:
52 (cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
53
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000054libFLAC:
Josh Coalson0cf199f2001-01-19 22:34:26 +000055 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000056
Josh Coalsona86f8702002-08-20 04:03:24 +000057libFLAC++: libFLAC
Josh Coalsonaae225a2002-05-17 06:07:26 +000058 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
59
Josh Coalsona86f8702002-08-20 04:03:24 +000060libOggFLAC: libFLAC
Josh Coalsonc49380d2002-08-07 17:38:08 +000061 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
62
Josh Coalsona86f8702002-08-20 04:03:24 +000063libOggFLAC++: libFLAC
Josh Coalsonc49380d2002-08-07 17:38:08 +000064 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
65
Josh Coalson1565cb62002-11-19 06:21:42 +000066share: libFLAC
67 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonaae225a2002-05-17 06:07:26 +000068
Josh Coalsonca673712002-09-05 05:39:47 +000069flac: libFLAC libOggFLAC share
Josh Coalson0cf199f2001-01-19 22:34:26 +000070 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000071
Josh Coalson57ba6f42002-06-07 05:27:37 +000072metaflac: libFLAC share
Josh Coalson74766922001-02-23 23:15:00 +000073 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
74
Josh Coalson1f99eac2002-08-23 06:45:23 +000075plugin_common: libFLAC
76 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
77
78plugin_xmms: libFLAC plugin_common
Josh Coalson0cf199f2001-01-19 22:34:26 +000079 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalson614ba672000-12-22 22:49:09 +000080
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000081test_streams: libFLAC
Josh Coalson0cf199f2001-01-19 22:34:26 +000082 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000083
Josh Coalson14cb7192002-11-27 04:45:48 +000084test_grabbag: share
Josh Coalsondfdc8182002-11-22 06:25:16 +000085 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
86
Josh Coalson57ba6f42002-06-07 05:27:37 +000087test_libFLAC: libFLAC
88 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
89
90test_libFLAC++: libFLAC libFLAC++
Josh Coalson0cf199f2001-01-19 22:34:26 +000091 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000092
Josh Coalsona86f8702002-08-20 04:03:24 +000093test_libOggFLAC: libFLAC libOggFLAC
94 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
95
96test_libOggFLAC++: libFLAC libOggFLAC libOggFLAC++
97 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
98
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000099test: debug
Josh Coalson34c1ea82002-12-04 04:57:33 +0000100 (cd test ; $(MAKE) -f Makefile.lite debug)
101
102testv: valgrind
103 (cd test ; $(MAKE) -f Makefile.lite valgrind)
104
105testr: release
106 (cd test ; $(MAKE) -f Makefile.lite release)
Josh Coalsonbb7f6b92000-12-10 04:09:52 +0000107
108clean:
Josh Coalsonef5c2f82002-07-24 06:13:41 +0000109 -(cd doc ; $(MAKE) -f Makefile.lite clean)
Josh Coalson21cd7b82002-12-28 07:03:01 +0000110 -(cd src ; $(MAKE) -f Makefile.lite clean)
Josh Coalson0cf199f2001-01-19 22:34:26 +0000111 -(cd test ; $(MAKE) -f Makefile.lite clean)