1 |
# |
---|
2 |
# Copyright (C) 2007 Arnold Krille |
---|
3 |
# Copyright (C) 2007 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 3 of the License, or |
---|
13 |
# (at your option) any later version. |
---|
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 |
|
---|
24 |
import os |
---|
25 |
import sys |
---|
26 |
|
---|
27 |
Import( 'env' ) |
---|
28 |
dbus_env = env.Copy() |
---|
29 |
|
---|
30 |
if dbus_env.has_key('DBUS1_FLAGS'): |
---|
31 |
dbus_env.MergeFlags( dbus_env['DBUS1_FLAGS'] ) |
---|
32 |
|
---|
33 |
# add the local version of libdbus++ |
---|
34 |
dbus_env.AppendUnique( CPPPATH=["#/external/dbus/include"] ) |
---|
35 |
dbus_env.AppendUnique( LIBPATH=[dbus_env['build_base']+"external/dbus"]) |
---|
36 |
dbus_env.AppendUnique( LIBS=["dbus-c++"] ) |
---|
37 |
dbus_env.AppendUnique( CCFLAGS=["-DDBUS_API_SUBJECT_TO_CHANGE"] ) |
---|
38 |
|
---|
39 |
sources = [ |
---|
40 |
'src/connection.cpp', |
---|
41 |
'src/debug.cpp', |
---|
42 |
'src/dispatcher.cpp', |
---|
43 |
'src/error.cpp', |
---|
44 |
'src/eventloop.cpp', |
---|
45 |
'src/interface.cpp', |
---|
46 |
'src/introspection.cpp', |
---|
47 |
'src/property.cpp', |
---|
48 |
'src/message.cpp', |
---|
49 |
'src/object.cpp', |
---|
50 |
'src/pendingcall.cpp', |
---|
51 |
'src/server.cpp', |
---|
52 |
'src/types.cpp' |
---|
53 |
] |
---|
54 |
|
---|
55 |
if dbus_env.has_key('DEBUG') and dbus_env['DEBUG']: |
---|
56 |
dbus_env.AppendUnique( CCFLAGS=["-DDEBUG","-g"] ) |
---|
57 |
|
---|
58 |
dbus_env.PrependUnique( LIBS=["expat"] ) |
---|
59 |
libdbuspp=dbus_env.StaticLibrary('dbus-c++', sources) |
---|
60 |
|
---|
61 |
# |
---|
62 |
# tools |
---|
63 |
# |
---|
64 |
|
---|
65 |
tools_env = dbus_env |
---|
66 |
|
---|
67 |
introspect_sources = [ |
---|
68 |
'tools/introspect.cpp', |
---|
69 |
] |
---|
70 |
|
---|
71 |
xml2cpp_sources = [ |
---|
72 |
'tools/xml.cpp','tools/xml2cpp.cpp' |
---|
73 |
] |
---|
74 |
|
---|
75 |
tools_env.AppendUnique( CCFLAGS=["-DDBUS_API_SUBJECT_TO_CHANGE"] ) |
---|
76 |
tools_env.AppendUnique( CPPPATH=["#/external/dbus/include"] ) |
---|
77 |
tools_env.PrependUnique( LIBPATH=dbus_env['build_base']+"external/dbus" ) |
---|
78 |
tools_env.PrependUnique( LIBS="dbus-c++" ) |
---|
79 |
|
---|
80 |
dbusxx_introspect = tools_env.Program('dbusxx-introspect', introspect_sources) |
---|
81 |
dbusxx_xml2cpp = tools_env.Program('dbusxx-xml2cpp', xml2cpp_sources) |
---|
82 |
|
---|