Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 1 | # FLAC - Free Lossless Audio Codec |
Josh Coalson | afae69f | 2003-01-02 07:03:16 +0000 | [diff] [blame] | 2 | # Copyright (C) 2001,2002,2003 Josh Coalson |
Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 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 | |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 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 |
Josh Coalson | 34c1ea8 | 2002-12-04 04:57:33 +0000 | [diff] [blame] | 25 | # valgrind: build all libraries and programs in debug mode, dynamically linked and ready for valgrind |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 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 | |
Josh Coalson | cd0e322 | 2002-10-23 22:08:13 +0000 | [diff] [blame] | 31 | topdir = . |
| 32 | |
Josh Coalson | 21cd7b8 | 2002-12-28 07:03:01 +0000 | [diff] [blame] | 33 | .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 |
| 34 | all: doc src |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 35 | |
| 36 | DEFAULT_CONFIG = release |
| 37 | |
| 38 | CONFIG = $(DEFAULT_CONFIG) |
| 39 | |
| 40 | debug : CONFIG = debug |
Josh Coalson | 34c1ea8 | 2002-12-04 04:57:33 +0000 | [diff] [blame] | 41 | valgrind: CONFIG = valgrind |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 42 | release : CONFIG = release |
| 43 | |
| 44 | debug : all |
Josh Coalson | 34c1ea8 | 2002-12-04 04:57:33 +0000 | [diff] [blame] | 45 | valgrind: all |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 46 | release : all |
| 47 | |
Josh Coalson | ef5c2f8 | 2002-07-24 06:13:41 +0000 | [diff] [blame] | 48 | doc: |
| 49 | (cd $@ ; $(MAKE) -f Makefile.lite) |
| 50 | |
Josh Coalson | 21cd7b8 | 2002-12-28 07:03:01 +0000 | [diff] [blame] | 51 | src: |
| 52 | (cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
| 53 | |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 54 | libFLAC: |
Josh Coalson | 0cf199f | 2001-01-19 22:34:26 +0000 | [diff] [blame] | 55 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 56 | |
Josh Coalson | a86f870 | 2002-08-20 04:03:24 +0000 | [diff] [blame] | 57 | libFLAC++: libFLAC |
Josh Coalson | aae225a | 2002-05-17 06:07:26 +0000 | [diff] [blame] | 58 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
| 59 | |
Josh Coalson | a86f870 | 2002-08-20 04:03:24 +0000 | [diff] [blame] | 60 | libOggFLAC: libFLAC |
Josh Coalson | c49380d | 2002-08-07 17:38:08 +0000 | [diff] [blame] | 61 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
| 62 | |
Josh Coalson | a86f870 | 2002-08-20 04:03:24 +0000 | [diff] [blame] | 63 | libOggFLAC++: libFLAC |
Josh Coalson | c49380d | 2002-08-07 17:38:08 +0000 | [diff] [blame] | 64 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
| 65 | |
Josh Coalson | 1565cb6 | 2002-11-19 06:21:42 +0000 | [diff] [blame] | 66 | share: libFLAC |
| 67 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
Josh Coalson | aae225a | 2002-05-17 06:07:26 +0000 | [diff] [blame] | 68 | |
Josh Coalson | ca67371 | 2002-09-05 05:39:47 +0000 | [diff] [blame] | 69 | flac: libFLAC libOggFLAC share |
Josh Coalson | 0cf199f | 2001-01-19 22:34:26 +0000 | [diff] [blame] | 70 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 71 | |
Josh Coalson | 57ba6f4 | 2002-06-07 05:27:37 +0000 | [diff] [blame] | 72 | metaflac: libFLAC share |
Josh Coalson | 7476692 | 2001-02-23 23:15:00 +0000 | [diff] [blame] | 73 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
| 74 | |
Josh Coalson | 1f99eac | 2002-08-23 06:45:23 +0000 | [diff] [blame] | 75 | plugin_common: libFLAC |
| 76 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
| 77 | |
| 78 | plugin_xmms: libFLAC plugin_common |
Josh Coalson | 0cf199f | 2001-01-19 22:34:26 +0000 | [diff] [blame] | 79 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
Josh Coalson | 614ba67 | 2000-12-22 22:49:09 +0000 | [diff] [blame] | 80 | |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 81 | test_streams: libFLAC |
Josh Coalson | 0cf199f | 2001-01-19 22:34:26 +0000 | [diff] [blame] | 82 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 83 | |
Josh Coalson | 14cb719 | 2002-11-27 04:45:48 +0000 | [diff] [blame] | 84 | test_grabbag: share |
Josh Coalson | dfdc818 | 2002-11-22 06:25:16 +0000 | [diff] [blame] | 85 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
| 86 | |
Josh Coalson | 57ba6f4 | 2002-06-07 05:27:37 +0000 | [diff] [blame] | 87 | test_libFLAC: libFLAC |
| 88 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
| 89 | |
| 90 | test_libFLAC++: libFLAC libFLAC++ |
Josh Coalson | 0cf199f | 2001-01-19 22:34:26 +0000 | [diff] [blame] | 91 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 92 | |
Josh Coalson | a86f870 | 2002-08-20 04:03:24 +0000 | [diff] [blame] | 93 | test_libOggFLAC: libFLAC libOggFLAC |
| 94 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
| 95 | |
| 96 | test_libOggFLAC++: libFLAC libOggFLAC libOggFLAC++ |
| 97 | (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG)) |
| 98 | |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 99 | test: debug |
Josh Coalson | 34c1ea8 | 2002-12-04 04:57:33 +0000 | [diff] [blame] | 100 | (cd test ; $(MAKE) -f Makefile.lite debug) |
| 101 | |
| 102 | testv: valgrind |
| 103 | (cd test ; $(MAKE) -f Makefile.lite valgrind) |
| 104 | |
| 105 | testr: release |
| 106 | (cd test ; $(MAKE) -f Makefile.lite release) |
Josh Coalson | bb7f6b9 | 2000-12-10 04:09:52 +0000 | [diff] [blame] | 107 | |
| 108 | clean: |
Josh Coalson | ef5c2f8 | 2002-07-24 06:13:41 +0000 | [diff] [blame] | 109 | -(cd doc ; $(MAKE) -f Makefile.lite clean) |
Josh Coalson | 21cd7b8 | 2002-12-28 07:03:01 +0000 | [diff] [blame] | 110 | -(cd src ; $(MAKE) -f Makefile.lite clean) |
Josh Coalson | 0cf199f | 2001-01-19 22:34:26 +0000 | [diff] [blame] | 111 | -(cd test ; $(MAKE) -f Makefile.lite clean) |