blob: 23743f6ecf59285b8f70c5c0fc118112952c1775 [file] [log] [blame]
Josh Coalson6b05bc52001-06-08 00:13:21 +00001# FLAC - Free Lossless Audio Codec
Josh Coalsondea0f5a2009-01-07 07:31:28 +00002# Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
Josh Coalson6b05bc52001-06-08 00:13:21 +00003#
Josh Coalsone8a76012003-02-07 00:14:32 +00004# This file is part the FLAC project. FLAC is comprised of several
5# components distributed under difference licenses. The codec libraries
6# are distributed under Xiph.Org's BSD-like license (see the file
7# COPYING.Xiph in this distribution). All other programs, libraries, and
8# plugins are distributed under the GPL (see COPYING.GPL). The documentation
9# is distributed under the Gnu FDL (see COPYING.FDL). Each file in the
10# FLAC distribution contains at the top the terms under which it may be
11# distributed.
Josh Coalson6b05bc52001-06-08 00:13:21 +000012#
Josh Coalsone8a76012003-02-07 00:14:32 +000013# Since this particular file is relevant to all components of FLAC,
14# it may be distributed under the Xiph.Org license, which is the least
15# restrictive of those mentioned above. See the file COPYING.Xiph in this
16# distribution.
Josh Coalson6b05bc52001-06-08 00:13:21 +000017
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
Hendricks26696d081c2012-12-29 04:22:59 -060033.PHONY: all doc src examples libFLAC libFLAC++ share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams utils flacdiff flactimer
Josh Coalson44937a72007-09-12 02:42:05 +000034all: doc src examples
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:
Josh Coalson44937a72007-09-12 02:42:05 +000049 (cd $@ && $(MAKE) -f Makefile.lite)
Josh Coalsonef5c2f82002-07-24 06:13:41 +000050
Hendricks26696d081c2012-12-29 04:22:59 -060051src examples:
Josh Coalson44937a72007-09-12 02:42:05 +000052 (cd $@ && $(MAKE) -f Makefile.lite $(CONFIG))
53
Hendricks26696d081c2012-12-29 04:22:59 -060054libFLAC libFLAC++ share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++:
Josh Coalson44937a72007-09-12 02:42:05 +000055 (cd src/$@ && $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000056
Hendricks26696d081c2012-12-29 04:22:59 -060057flacdiff flactimer:
58 (cd src/utils/$@ && $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000059
60test: debug
Josh Coalson44937a72007-09-12 02:42:05 +000061 (cd test && $(MAKE) -f Makefile.lite debug)
Josh Coalson34c1ea82002-12-04 04:57:33 +000062
63testv: valgrind
Josh Coalson44937a72007-09-12 02:42:05 +000064 (cd test && $(MAKE) -f Makefile.lite valgrind)
Josh Coalson34c1ea82002-12-04 04:57:33 +000065
66testr: release
Josh Coalson44937a72007-09-12 02:42:05 +000067 (cd test && $(MAKE) -f Makefile.lite release)
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000068
69clean:
Josh Coalson44937a72007-09-12 02:42:05 +000070 -(cd doc && $(MAKE) -f Makefile.lite clean)
71 -(cd src && $(MAKE) -f Makefile.lite clean)
72 -(cd examples && $(MAKE) -f Makefile.lite clean)
73 -(cd test && $(MAKE) -f Makefile.lite clean)
Hendricks26696d081c2012-12-29 04:22:59 -060074
75examples: libFLAC libFLAC++ share
76include $(topdir)/Makefile.deps