3
# Copyright (C) 2007,2008,2011 Arnold Krille
4
# Copyright (C) 2007-2008 Pieter Palmers
6
# This file is part of FFADO
7
# FFADO = Free Firewire (pro-)audio drivers for linux
9
# FFADO is based upon FreeBoB.
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.
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.
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/>.
32
# For the debugging apps
35
env.AppendUnique( CPPPATH=["#/", "#/src"] )
36
env.PrependUnique( LIBPATH=[env['build_base']+"src"] )
37
env.PrependUnique( LIBS=["ffado"] )
39
if not env.GetOption( "clean" ):
40
env.MergeFlags( env["DBUS1_FLAGS"] )
41
env.MergeFlags( env["DBUSC1_FLAGS"] )
42
env.MergeFlags( env['LIBRAW1394_FLAGS'] )
43
if not env['SERIALIZE_USE_EXPAT']:
44
env.MergeFlags( env['LIBXML26_FLAGS'] )
46
env.PrependUnique( LIBS=["expat"] )
48
env.Xml2Cpp_Proxy('controlclient-glue.h', 'control-interface.xml')
49
env.Xml2Cpp_Adaptor('controlserver-glue.h', 'control-interface.xml')
51
static_env = env.Clone()
59
"ffado-dbus-server":"ffado-dbus-server.cpp controlserver.cpp",
60
"test-dbus" : "test-dbus.cpp controlclient.cpp",
61
"test-dbus-server" : "test-dbus-server.cpp controlserver.cpp",
64
installapps += [ "ffado-dbus-server" ]
66
for app in apps.keys():
67
env.Program( target=app, source = env.Split( apps[app] ) )
68
if app.find( "test" ) == -1:
69
env.Install( "$bindir", app )
71
servicefile = env.ScanReplace('org.ffado.Control.service.in')
72
if env['dbus_service_dir'] and ( env.destdir or os.access( env['dbus_service_dir'], os.W_OK ) ):
73
print "Will install the service-file"
74
targetdir = env.destdir + env['dbus_service_dir']
75
env.Alias( "install", env.Install( env.destdir + env['dbus_service_dir'], servicefile ) )
77
if not env['dbus_service_dir']:
78
print 'Can\'t install the system-wide dbus service file as the concerned variable is not defined.'
80
if not os.access( env['dbus_service_dir'], os.W_OK ):
81
print 'Insufficient rights to install the system-wide dbus service file.'
82
print 'Please run the "scons install" command with higher authority.'
85
if static_env['BUILD_STATIC_TOOLS']:
86
static_env.Append(LIBS=File('#/src/libffado.a'))
87
for app in apps.keys():
88
static_app = app + "-static"
89
static_env.Program( target=static_app, source = static_env.Split( apps[app] ) )