root/trunk/libffado/support/dbus/SConscript

Revision 2802, 3.3 kB (checked in by jwoithe, 3 years ago)

Cosmetic: "Firewire" becomes "FireWire?".

Officially both the "F" and "W" were capitalised in the FireWire? name, so
reflect this throughout FFADO's source tree. This mostly affects comments.

This patch originated from pander on the ffado-devel mailing list. To
maintain consistency, the committed version has been expanded to include
files not originally included in the original patch.

Line 
1 #!/bin/env python
2 #
3 # Copyright (C) 2007,2008,2011 Arnold Krille
4 # Copyright (C) 2007-2008 Pieter Palmers
5 #
6 # This file is part of FFADO
7 # FFADO = Free FireWire (pro-)audio drivers for linux
8 #
9 # FFADO is based upon FreeBoB.
10 #
11 # This program is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 2 of the License, or
14 # (at your option) version 3 of the License.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 #
24
25 import os
26
27 Import( 'env' )
28
29 env = env.Clone()
30
31 #
32 # For the debugging apps
33 #
34
35 env.AppendUnique( CPPPATH=["#/", "#/src"] )
36 env.PrependUnique( LIBPATH=[env['build_base']+"src"] )
37 env.PrependUnique( LIBS=["ffado", "pthread"] )
38
39 if not env.GetOption( "clean" ):
40     env.MergeFlags( env["DBUS1_FLAGS"].decode() )
41     env.MergeFlags( env["DBUSC1_FLAGS"].decode() )
42     env.MergeFlags( env['LIBRAW1394_FLAGS'].decode() )
43     if not env['SERIALIZE_USE_EXPAT']:
44         if 'LIBXML30_FLAGS' in env :
45             env.MergeFlags( env['LIBXML30_FLAGS'].decode() )
46         if not('LIBXML30_FLAGS' in env) :
47             env.MergeFlags( env['LIBXML26_FLAGS'].decode() )
48     else:
49         env.PrependUnique( LIBS=["expat"] )
50
51 env.Xml2Cpp_Proxy('controlclient-glue.h', 'control-interface.xml')
52 env.Xml2Cpp_Adaptor('controlserver-glue.h', 'control-interface.xml')
53
54 static_env = env.Clone()
55
56 apps = {
57 }
58
59 installapps = []
60
61 apps = {
62     "ffado-dbus-server":"ffado-dbus-server.cpp controlserver.cpp",
63     "test-dbus" : "test-dbus.cpp controlclient.cpp",
64     "test-dbus-server" : "test-dbus-server.cpp controlserver.cpp",
65 }
66
67 manpages = (
68     "ffado-dbus-server.1",
69 )
70
71 installapps += [ "ffado-dbus-server" ]
72
73 for app in apps.keys():
74     env.Program( target=app, source = env.Split( apps[app] ) )
75     if app.find( "test" ) == -1:
76         env.Install( "$bindir", app )
77
78 for manpage in manpages:
79     section = manpage.split(".")[1]
80     dest = os.path.join("$mandir", "man"+section, manpage)
81     env.InstallAs(source=manpage, target=dest)
82
83 servicefile = env.ScanReplace('org.ffado.Control.service.in')
84 if env['dbus_service_dir'] and ( env.destdir or os.access( env['dbus_service_dir'], os.W_OK ) ):
85     print("Will install the service-file")
86     targetdir = env.destdir + env['dbus_service_dir'].decode()
87     env.Alias( "install", env.Install( env.destdir + env['dbus_service_dir'].decode(), servicefile ) )
88 else:
89     if not env['dbus_service_dir']:
90         print('Can\'t install the system-wide dbus service file as the concerned variable is not defined.')
91     else:
92         if not os.access( env['dbus_service_dir'], os.W_OK ):
93             print('Insufficient rights to install the system-wide dbus service file.')
94             print('Please run the "scons install" command with higher authority.')
95
96 # static versions
97 if static_env['BUILD_STATIC_TOOLS']:
98     static_env.Append(LIBS=File('#/src/libffado.a'))
99     for app in apps.keys():
100         static_app = app + "-static"
101         static_env.Program( target=static_app, source = static_env.Split( apps[app] ) )
102
103 # vim: et
Note: See TracBrowser for help on using the browser.