Makefile.lite 3.28 KB
Newer Older
1
#  FLAC - Free Lossless Audio Codec
Josh Coalson's avatar
Josh Coalson committed
2
#  Copyright (C) 2001,2002,2003,2004,2005  Josh Coalson
3
#
Josh Coalson's avatar
Josh Coalson committed
4
5
6
7
8
9
10
11
#  This file is part the FLAC project.  FLAC is comprised of several
#  components distributed under difference licenses.  The codec libraries
#  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.
12
#
Josh Coalson's avatar
Josh Coalson committed
13
14
15
16
#  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.
17

Josh Coalson's avatar
Josh Coalson committed
18
19
20
21
22
23
24
#
# 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
25
# valgrind: build all libraries and programs in debug mode, dynamically linked and ready for valgrind
Josh Coalson's avatar
Josh Coalson committed
26
27
28
29
30
# release : build all libraries and programs in release mode
# test    : run the unit and stream tests
# clean   : remove all non-distro files
#

31
32
topdir = .

33
.PHONY: all doc src libFLAC libFLAC++ libOggFLAC libOggFLAC++ share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_libOggFLAC test_libOggFLAC++ test_seeking test_streams
Josh Coalson's avatar
Josh Coalson committed
34
all: doc src
Josh Coalson's avatar
Josh Coalson committed
35
36
37
38
39
40

DEFAULT_CONFIG = release

CONFIG = $(DEFAULT_CONFIG)

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

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

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

Josh Coalson's avatar
Josh Coalson committed
51
52
53
src:
	(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))

Josh Coalson's avatar
Josh Coalson committed
54
libFLAC:
55
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalson's avatar
Josh Coalson committed
56

57
libFLAC++: libFLAC
Josh Coalson's avatar
Josh Coalson committed
58
59
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))

60
libOggFLAC: libFLAC
Josh Coalson's avatar
Josh Coalson committed
61
62
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))

63
libOggFLAC++: libFLAC
Josh Coalson's avatar
Josh Coalson committed
64
65
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))

Josh Coalson's avatar
Josh Coalson committed
66
67
share: libFLAC
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalson's avatar
Josh Coalson committed
68

69
flac: libFLAC libOggFLAC share
70
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalson's avatar
Josh Coalson committed
71

72
metaflac: libFLAC share
Josh Coalson's avatar
Josh Coalson committed
73
74
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))

75
76
77
78
plugin_common: libFLAC
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))

plugin_xmms: libFLAC plugin_common
79
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalson's avatar
Josh Coalson committed
80

81
82
83
test_seeking: libFLAC libOggFLAC
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))

Josh Coalson's avatar
Josh Coalson committed
84
test_streams: libFLAC
85
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalson's avatar
Josh Coalson committed
86

Josh Coalson's avatar
Josh Coalson committed
87
test_grabbag: share
Josh Coalson's avatar
Josh Coalson committed
88
89
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))

90
91
92
93
test_libFLAC: libFLAC
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))

test_libFLAC++: libFLAC libFLAC++
94
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
Josh Coalson's avatar
Josh Coalson committed
95

96
97
98
99
100
101
test_libOggFLAC: libFLAC libOggFLAC
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))

test_libOggFLAC++: libFLAC libOggFLAC libOggFLAC++
	(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))

Josh Coalson's avatar
Josh Coalson committed
102
test: debug
Josh Coalson's avatar
Josh Coalson committed
103
104
105
106
107
108
109
	(cd test ; $(MAKE) -f Makefile.lite debug)

testv: valgrind
	(cd test ; $(MAKE) -f Makefile.lite valgrind)

testr: release
	(cd test ; $(MAKE) -f Makefile.lite release)
Josh Coalson's avatar
Josh Coalson committed
110
111

clean:
Josh Coalson's avatar
Josh Coalson committed
112
	-(cd doc ; $(MAKE) -f Makefile.lite clean)
Josh Coalson's avatar
Josh Coalson committed
113
	-(cd src ; $(MAKE) -f Makefile.lite clean)
114
	-(cd test ; $(MAKE) -f Makefile.lite clean)