blob: 1db716353d63bb556c7cf8afb50ad3537a613f4d [file] [log] [blame]
Josh Coalson6b05bc52001-06-08 00:13:21 +00001# FLAC - Free Lossless Audio Codec
Josh Coalsone74bd952007-02-02 06:58:19 +00002# Copyright (C) 2001,2002,2003,2004,2005,2006,2007 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
Josh Coalson8da98c82006-10-15 04:24:05 +000033.PHONY: all doc src libFLAC libFLAC++ share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams
Josh Coalson21cd7b82002-12-28 07:03:01 +000034all: 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 Coalson1565cb62002-11-19 06:21:42 +000060share: libFLAC
61 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonaae225a2002-05-17 06:07:26 +000062
Josh Coalson8da98c82006-10-15 04:24:05 +000063flac: libFLAC share
Josh Coalson0cf199f2001-01-19 22:34:26 +000064 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000065
Josh Coalson57ba6f42002-06-07 05:27:37 +000066metaflac: libFLAC share
Josh Coalson74766922001-02-23 23:15:00 +000067 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
68
Josh Coalson1f99eac2002-08-23 06:45:23 +000069plugin_common: libFLAC
70 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
71
72plugin_xmms: libFLAC plugin_common
Josh Coalson0cf199f2001-01-19 22:34:26 +000073 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalson614ba672000-12-22 22:49:09 +000074
Josh Coalson8da98c82006-10-15 04:24:05 +000075test_seeking: libFLAC
Josh Coalson94b54992004-09-21 05:41:23 +000076 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
77
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000078test_streams: libFLAC
Josh Coalson0cf199f2001-01-19 22:34:26 +000079 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000080
Josh Coalson14cb7192002-11-27 04:45:48 +000081test_grabbag: share
Josh Coalsondfdc8182002-11-22 06:25:16 +000082 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
83
Josh Coalson57ba6f42002-06-07 05:27:37 +000084test_libFLAC: libFLAC
85 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
86
87test_libFLAC++: libFLAC libFLAC++
Josh Coalson0cf199f2001-01-19 22:34:26 +000088 (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000089
90test: debug
Josh Coalson34c1ea82002-12-04 04:57:33 +000091 (cd test ; $(MAKE) -f Makefile.lite debug)
92
93testv: valgrind
94 (cd test ; $(MAKE) -f Makefile.lite valgrind)
95
96testr: release
97 (cd test ; $(MAKE) -f Makefile.lite release)
Josh Coalsonbb7f6b92000-12-10 04:09:52 +000098
99clean:
Josh Coalsonef5c2f82002-07-24 06:13:41 +0000100 -(cd doc ; $(MAKE) -f Makefile.lite clean)
Josh Coalson21cd7b82002-12-28 07:03:01 +0000101 -(cd src ; $(MAKE) -f Makefile.lite clean)
Josh Coalson0cf199f2001-01-19 22:34:26 +0000102 -(cd test ; $(MAKE) -f Makefile.lite clean)