root/trunk/libffado/support/firmware/SConscript

Revision 2089, 2.5 kB (checked in by jwoithe, 9 years ago)

Provide manpages for commonly used FFADO programs. Closes #294.

Line 
1 #
2 # Copyright (C) 2007-2008 Arnold Krille
3 # Copyright (C) 2007-2008 Pieter Palmers
4 #
5 # This file is part of FFADO
6 # FFADO = Free Firewire (pro-)audio drivers for linux
7 #
8 # FFADO is based upon FreeBoB.
9 #
10 # This program is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 2 of the License, or
13 # (at your option) version 3 of the License.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 #
23 import os
24
25 Import( 'env' )
26
27 env = env.Clone()
28
29 env.AppendUnique( CPPPATH=["#/", "#/src"] )
30
31 if not env.GetOption( "clean" ):
32     env.MergeFlags( "-lrt -lpthread" )
33     env.MergeFlags( env['LIBRAW1394_FLAGS'] )
34     env.MergeFlags( env['LIBIEC61883_FLAGS'] )
35     if not env['SERIALIZE_USE_EXPAT']:
36         env.MergeFlags( env['LIBXML26_FLAGS'] )
37     else:
38         env.PrependUnique( LIBS=["expat"] )
39
40 static_env = env.Clone()
41
42 apps = {
43 }
44
45 installapps = []
46
47 manpages = []
48
49 env.PrependUnique( LIBPATH=env['build_base']+"src" )
50 env.PrependUnique( LIBS="ffado" )
51
52 if env['ENABLE_BEBOB']:
53     apps["ffado-bridgeco-downloader"] = "downloader.cpp bridgeco-downloader.cpp"
54     installapps += [ "ffado-bridgeco-downloader" ]
55     manpages += [ "ffado-bridgeco-downloader.1" ]
56
57 if env['ENABLE_FIREWORKS']:
58     apps["ffado-fireworks-downloader"] = "downloader.cpp fireworks-downloader.cpp"
59     installapps += [ "ffado-fireworks-downloader" ]
60     manpages += [ "ffado-fireworks-downloader.1" ]
61
62 if env['ENABLE_DICE']:
63     apps["ffado-dice-firmware"] = "dice-firmware-utility.cpp"
64     installapps += [ "ffado-dice-firmware" ]
65     manpages += [ "ffado-dice-firmware.1" ]
66
67
68 for app in apps.keys():
69     env.Program( target=app, source = env.Split( apps[app] ) )
70     if app.find( "test" ) == -1:
71         env.Install( "$bindir", app )
72
73 for manpage in manpages:
74     section = manpage.split(".")[1]
75     dest = os.path.join("$mandir", "man"+section, manpage)
76     env.InstallAs(source=manpage, target=dest)
77
78
79 # static versions
80 if static_env['BUILD_STATIC_TOOLS']:
81     static_env.Append(LIBS=File('#/src/libffado.a'))
82     for app in apps.keys():
83         static_app = app + "-static"
84         static_env.Program( target=static_app, source = static_env.Split( apps[app] ) )
Note: See TracBrowser for help on using the browser.