instrument for valgrind
[platform/upstream/flac.git] / Makefile.lite
1 #  FLAC - Free Lossless Audio Codec
2 #  Copyright (C) 2001,2002  Josh Coalson
3 #
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 # 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
25 # valgrind: build all libraries and programs in debug mode, dynamically linked and ready for valgrind
26 # 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
31 topdir = .
32
33 .PHONY: doc libFLAC libFLAC++ libOggFLAC libOggFLAC++ share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_libOggFLAC test_libOggFLAC++ test_streams
34 all: doc libFLAC libFLAC++ libOggFLAC libOggFLAC++ share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_libOggFLAC test_libOggFLAC++ test_streams
35
36 DEFAULT_CONFIG = release
37
38 CONFIG = $(DEFAULT_CONFIG)
39
40 debug   : CONFIG = debug
41 valgrind: CONFIG = valgrind
42 release : CONFIG = release
43
44 debug   : all
45 valgrind: all
46 release : all
47
48 doc:
49         (cd $@ ; $(MAKE) -f Makefile.lite)
50
51 libFLAC:
52         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
53
54 libFLAC++: libFLAC
55         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
56
57 libOggFLAC: libFLAC
58         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
59
60 libOggFLAC++: libFLAC
61         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
62
63 share: libFLAC
64         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
65
66 flac: libFLAC libOggFLAC share
67         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
68
69 metaflac: libFLAC share
70         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
71
72 plugin_common: libFLAC
73         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
74
75 plugin_xmms: libFLAC plugin_common
76         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
77
78 test_streams: libFLAC
79         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
80
81 test_grabbag: share
82         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
83
84 test_libFLAC: libFLAC
85         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
86
87 test_libFLAC++: libFLAC libFLAC++
88         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
89
90 test_libOggFLAC: libFLAC libOggFLAC
91         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
92
93 test_libOggFLAC++: libFLAC libOggFLAC libOggFLAC++
94         (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
95
96 test: debug
97         (cd test ; $(MAKE) -f Makefile.lite debug)
98
99 testv: valgrind
100         (cd test ; $(MAKE) -f Makefile.lite valgrind)
101
102 testr: release
103         (cd test ; $(MAKE) -f Makefile.lite release)
104
105 clean:
106         -(cd doc ; $(MAKE) -f Makefile.lite clean)
107         -(cd src/libFLAC ; $(MAKE) -f Makefile.lite clean)
108         -(cd src/libFLAC++ ; $(MAKE) -f Makefile.lite clean)
109         -(cd src/libOggFLAC ; $(MAKE) -f Makefile.lite clean)
110         -(cd src/libOggFLAC++ ; $(MAKE) -f Makefile.lite clean)
111         -(cd src/share ; $(MAKE) -f Makefile.lite clean)
112         -(cd src/flac ; $(MAKE) -f Makefile.lite clean)
113         -(cd src/metaflac ; $(MAKE) -f Makefile.lite clean)
114         -(cd src/plugin_common ; $(MAKE) -f Makefile.lite clean)
115         -(cd src/plugin_xmms ; $(MAKE) -f Makefile.lite clean)
116         -(cd src/test_grabbag ; $(MAKE) -f Makefile.lite clean)
117         -(cd src/test_libFLAC ; $(MAKE) -f Makefile.lite clean)
118         -(cd src/test_libFLAC++ ; $(MAKE) -f Makefile.lite clean)
119         -(cd src/test_libOggFLAC ; $(MAKE) -f Makefile.lite clean)
120         -(cd src/test_libOggFLAC++ ; $(MAKE) -f Makefile.lite clean)
121         -(cd src/test_streams ; $(MAKE) -f Makefile.lite clean)
122         -(cd test ; $(MAKE) -f Makefile.lite clean)