Makefile.lite 2.48 KB
Newer Older
1
#  FLAC - Free Lossless Audio Codec
2
#  Copyright (C) 2001-2009  Josh Coalson
3
#  Copyright (C) 2011-2016  Xiph.Org Foundation
4
#
Josh Coalson's avatar
Josh Coalson committed
5
#  This file is part the FLAC project.  FLAC is comprised of several
6
#  components distributed under different licenses.  The codec libraries
Josh Coalson's avatar
Josh Coalson committed
7 8 9 10 11 12
#  are distributed under Xiph.Org's BSD-like license (see the file
#  COPYING.Xiph in this distribution).  All other programs, libraries, and
#  plugins are distributed under the GPL (see COPYING.GPL).  The documentation
#  is distributed under the Gnu FDL (see COPYING.FDL).  Each file in the
#  FLAC distribution contains at the top the terms under which it may be
#  distributed.
13
#
Josh Coalson's avatar
Josh Coalson committed
14 15 16 17
#  Since this particular file is relevant to all components of FLAC,
#  it may be distributed under the Xiph.Org license, which is the least
#  restrictive of those mentioned above.  See the file COPYING.Xiph in this
#  distribution.
18

Josh Coalson's avatar
Josh Coalson committed
19 20 21 22 23 24 25
#
# GNU Makefile
#
# Useful targets
#
# all     : build all libraries and programs in the default configuration (currently 'release')
# debug   : build all libraries and programs in debug mode
Josh Coalson's avatar
Josh Coalson committed
26
# valgrind: build all libraries and programs in debug mode, dynamically linked and ready for valgrind
Josh Coalson's avatar
Josh Coalson committed
27 28 29 30 31
# release : build all libraries and programs in release mode
# test    : run the unit and stream tests
# clean   : remove all non-distro files
#

32 33
topdir = .

34
.PHONY: all doc src examples libFLAC libFLAC++ share plugin_common flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
35
all: src examples
Josh Coalson's avatar
Josh Coalson committed
36 37 38 39 40 41

DEFAULT_CONFIG = release

CONFIG = $(DEFAULT_CONFIG)

debug   : CONFIG = debug
Josh Coalson's avatar
Josh Coalson committed
42
valgrind: CONFIG = valgrind
Josh Coalson's avatar
Josh Coalson committed
43 44 45
release : CONFIG = release

debug   : all
Josh Coalson's avatar
Josh Coalson committed
46
valgrind: all
Josh Coalson's avatar
Josh Coalson committed
47 48
release : all

Josh Coalson's avatar
Josh Coalson committed
49
doc:
50
	(cd $@ && $(MAKE) -f Makefile.lite)
Josh Coalson's avatar
Josh Coalson committed
51

52
src examples:
53 54
	(cd $@ && $(MAKE) -f Makefile.lite $(CONFIG))

55
libFLAC libFLAC++ share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++:
56
	(cd src/$@ && $(MAKE) -f Makefile.lite $(CONFIG))
57

58 59
flacdiff flactimer:
	(cd src/utils/$@ && $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalson's avatar
Josh Coalson committed
60 61

test: debug
62
	(cd test && $(MAKE) -f Makefile.lite debug)
Josh Coalson's avatar
Josh Coalson committed
63 64

testv: valgrind
65
	(cd test && $(MAKE) -f Makefile.lite valgrind)
Josh Coalson's avatar
Josh Coalson committed
66 67

testr: release
68
	(cd test && $(MAKE) -f Makefile.lite release)
Josh Coalson's avatar
Josh Coalson committed
69 70

clean:
71 72 73 74
	-(cd doc && $(MAKE) -f Makefile.lite clean)
	-(cd src && $(MAKE) -f Makefile.lite clean)
	-(cd examples && $(MAKE) -f Makefile.lite clean)
	-(cd test && $(MAKE) -f Makefile.lite clean)
75 76 77

examples: libFLAC libFLAC++ share
include $(topdir)/Makefile.deps