blob: 2b394af837b743298b032a4db5db1aec78497694 [file] [log] [blame]
Josh Coalson6b05bc52001-06-08 00:13:21 +00001# FLAC - Free Lossless Audio Codec
Erik de Castro Lopob1982fb2013-05-25 17:11:19 +10002# Copyright (C) 2001-2009 Josh Coalson
Erik de Castro Lopo6a5fe432016-12-05 06:35:39 +11003# Copyright (C) 2011-2016 Xiph.Org Foundation
Josh Coalson6b05bc52001-06-08 00:13:21 +00004#
Josh Coalsone8a76012003-02-07 00:14:32 +00005# This file is part the FLAC project. FLAC is comprised of several
Ulrich Klauercd4ddab2013-05-26 22:53:43 +02006# components distributed under different licenses. The codec libraries
Josh Coalsone8a76012003-02-07 00:14:32 +00007# are distributed under Xiph.Org's BSD-like license (see the file
8# COPYING.Xiph in this distribution). All other programs, libraries, and
9# plugins are distributed under the GPL (see COPYING.GPL). The documentation
10# is distributed under the Gnu FDL (see COPYING.FDL). Each file in the
11# FLAC distribution contains at the top the terms under which it may be
12# distributed.
Josh Coalson6b05bc52001-06-08 00:13:21 +000013#
Josh Coalsone8a76012003-02-07 00:14:32 +000014# Since this particular file is relevant to all components of FLAC,
15# it may be distributed under the Xiph.Org license, which is the least
16# restrictive of those mentioned above. See the file COPYING.Xiph in this
17# distribution.
Josh Coalson6b05bc52001-06-08 00:13:21 +000018
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000019#
20# GNU Makefile
21#
22# Useful targets
23#
24# all : build all libraries and programs in the default configuration (currently 'release')
25# debug : build all libraries and programs in debug mode
Josh Coalson34c1ea82002-12-04 04:57:33 +000026# valgrind: build all libraries and programs in debug mode, dynamically linked and ready for valgrind
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000027# release : build all libraries and programs in release mode
28# test : run the unit and stream tests
29# clean : remove all non-distro files
30#
31
Josh Coalsoncd0e3222002-10-23 22:08:13 +000032topdir = .
33
Erik de Castro Lopod40a6bc2016-02-05 11:02:44 +110034.PHONY: all doc src examples libFLAC libFLAC++ share plugin_common flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
Evan Ramosf658ea52014-06-26 17:25:48 -050035all: src examples
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000036
37DEFAULT_CONFIG = release
38
39CONFIG = $(DEFAULT_CONFIG)
40
41debug : CONFIG = debug
Josh Coalson34c1ea82002-12-04 04:57:33 +000042valgrind: CONFIG = valgrind
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000043release : CONFIG = release
44
45debug : all
Josh Coalson34c1ea82002-12-04 04:57:33 +000046valgrind: all
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000047release : all
48
Josh Coalsonef5c2f82002-07-24 06:13:41 +000049doc:
Josh Coalson44937a72007-09-12 02:42:05 +000050 (cd $@ && $(MAKE) -f Makefile.lite)
Josh Coalsonef5c2f82002-07-24 06:13:41 +000051
Hendricks26696d081c2012-12-29 04:22:59 -060052src examples:
Josh Coalson44937a72007-09-12 02:42:05 +000053 (cd $@ && $(MAKE) -f Makefile.lite $(CONFIG))
54
Erik de Castro Lopod40a6bc2016-02-05 11:02:44 +110055libFLAC 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 +000056 (cd src/$@ && $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000057
Hendricks26696d081c2012-12-29 04:22:59 -060058flacdiff flactimer:
59 (cd src/utils/$@ && $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000060
61test: debug
Josh Coalson44937a72007-09-12 02:42:05 +000062 (cd test && $(MAKE) -f Makefile.lite debug)
Josh Coalson34c1ea82002-12-04 04:57:33 +000063
64testv: valgrind
Josh Coalson44937a72007-09-12 02:42:05 +000065 (cd test && $(MAKE) -f Makefile.lite valgrind)
Josh Coalson34c1ea82002-12-04 04:57:33 +000066
67testr: release
Josh Coalson44937a72007-09-12 02:42:05 +000068 (cd test && $(MAKE) -f Makefile.lite release)
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000069
70clean:
Josh Coalson44937a72007-09-12 02:42:05 +000071 -(cd doc && $(MAKE) -f Makefile.lite clean)
72 -(cd src && $(MAKE) -f Makefile.lite clean)
73 -(cd examples && $(MAKE) -f Makefile.lite clean)
74 -(cd test && $(MAKE) -f Makefile.lite clean)
Hendricks26696d081c2012-12-29 04:22:59 -060075
76examples: libFLAC libFLAC++ share
77include $(topdir)/Makefile.deps