blob: 7e297c31a364f8c79e9df8d912164f96ab28443f [file] [log] [blame]
Josh Coalsonfcd85f82002-12-28 07:02:38 +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 Coalsonfcd85f82002-12-28 07:02:38 +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 Coalsonfcd85f82002-12-28 07:02:38 +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 Coalsonfcd85f82002-12-28 07:02:38 +000018
Josh Coalsonf3a8e5c2008-12-30 02:10:16 +000019topdir = ..
20
21include $(topdir)/build/config.mk
22
Josh Coalsonc10f9782008-09-14 19:59:52 +000023ifeq ($(OS),Darwin)
Hendricks26696d081c2012-12-29 04:22:59 -060024 EXTRA_TARGETS =
Josh Coalson59c9d342008-09-09 07:16:51 +000025else
Josh Coalsonf3a8e5c2008-12-30 02:10:16 +000026ifeq ($(PROC),x86_64)
Hendricks26696d081c2012-12-29 04:22:59 -060027 EXTRA_TARGETS =
Josh Coalsonf3a8e5c2008-12-30 02:10:16 +000028else
Erik de Castro Lopo097c0e72014-06-26 19:18:29 +100029 # Can add plugin_xmms here if desired.
30 EXTRA_TARGETS =
Josh Coalson59c9d342008-09-09 07:16:51 +000031endif
Josh Coalsonf3a8e5c2008-12-30 02:10:16 +000032endif
Josh Coalson59c9d342008-09-09 07:16:51 +000033
Evan Ramosf658ea52014-06-26 17:25:48 -050034ifeq ($(findstring Windows,$(OS)),Windows)
Evan Ramos9df67362014-06-23 16:24:49 -050035 EXTRA_TARGETS += share/win_utf8_io
36endif
37
Erik de Castro Lopo097c0e72014-06-26 19:18:29 +100038.PHONY: all flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share/win_utf8_io share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
39all: flac libFLAC libFLAC++ metaflac plugin_common $(EXTRA_TARGETS) share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams
Josh Coalsonfcd85f82002-12-28 07:02:38 +000040
41DEFAULT_CONFIG = release
42
43CONFIG = $(DEFAULT_CONFIG)
44
45debug : CONFIG = debug
46valgrind: CONFIG = valgrind
47release : CONFIG = release
48
49debug : all
50valgrind: all
51release : all
52
Evan Ramosf658ea52014-06-26 17:25:48 -050053flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share/win_utf8_io share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams:
Josh Coalsonfcd85f82002-12-28 07:02:38 +000054 (cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
55
Hendricks26696d081c2012-12-29 04:22:59 -060056flacdiff flactimer:
57 (cd utils/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
58
Josh Coalsonfcd85f82002-12-28 07:02:38 +000059clean:
60 -(cd flac ; $(MAKE) -f Makefile.lite clean)
61 -(cd libFLAC ; $(MAKE) -f Makefile.lite clean)
62 -(cd libFLAC++ ; $(MAKE) -f Makefile.lite clean)
Josh Coalsonfcd85f82002-12-28 07:02:38 +000063 -(cd metaflac ; $(MAKE) -f Makefile.lite clean)
64 -(cd plugin_common ; $(MAKE) -f Makefile.lite clean)
65 -(cd plugin_xmms ; $(MAKE) -f Makefile.lite clean)
66 -(cd share ; $(MAKE) -f Makefile.lite clean)
67 -(cd test_grabbag ; $(MAKE) -f Makefile.lite clean)
Josh Coalson6b21f662006-09-13 01:42:27 +000068 -(cd test_libs_common ; $(MAKE) -f Makefile.lite clean)
Josh Coalsonfcd85f82002-12-28 07:02:38 +000069 -(cd test_libFLAC ; $(MAKE) -f Makefile.lite clean)
70 -(cd test_libFLAC++ ; $(MAKE) -f Makefile.lite clean)
Josh Coalson94b54992004-09-21 05:41:23 +000071 -(cd test_seeking ; $(MAKE) -f Makefile.lite clean)
Josh Coalsonfcd85f82002-12-28 07:02:38 +000072 -(cd test_streams ; $(MAKE) -f Makefile.lite clean)
Hendricks26696d081c2012-12-29 04:22:59 -060073 -(cd utils/flacdiff ; $(MAKE) -f Makefile.lite clean)
74 -(cd utils/flactimer ; $(MAKE) -f Makefile.lite clean)
Josh Coalsonfcd85f82002-12-28 07:02:38 +000075
Hendricks26696d081c2012-12-29 04:22:59 -060076include $(topdir)/Makefile.deps