1# FLAC - Free Lossless Audio Codec 2# Copyright (C) 2001-2009 Josh Coalson 3# Copyright (C) 2011-2016 Xiph.Org Foundation 4# 5# This file is part the FLAC project. FLAC is comprised of several 6# components distributed under different licenses. The codec libraries 7# 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. 13# 14# 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. 18 19# 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 26# valgrind: build all libraries and programs in debug mode, dynamically linked and ready for valgrind 27# 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 32topdir = . 33 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 35all: src examples 36 37DEFAULT_CONFIG = release 38 39CONFIG = $(DEFAULT_CONFIG) 40 41debug : CONFIG = debug 42valgrind: CONFIG = valgrind 43release : CONFIG = release 44 45debug : all 46valgrind: all 47release : all 48 49doc: 50 (cd $@ && $(MAKE) -f Makefile.lite) 51 52src examples: 53 (cd $@ && $(MAKE) -f Makefile.lite $(CONFIG)) 54 55libFLAC 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 58flacdiff flactimer: 59 (cd src/utils/$@ && $(MAKE) -f Makefile.lite $(CONFIG)) 60 61test: debug 62 (cd test && $(MAKE) -f Makefile.lite debug) 63 64testv: valgrind 65 (cd test && $(MAKE) -f Makefile.lite valgrind) 66 67testr: release 68 (cd test && $(MAKE) -f Makefile.lite release) 69 70clean: 71 -(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) 75 76examples: libFLAC libFLAC++ share 77include $(topdir)/Makefile.deps 78