root/trunk/libffado/src/SConscript

Revision 575, 5.8 kB (checked in by ppalmers, 14 years ago)

- Fixed bug in dbus c++ bindings
- First attempt at a decoupled control interface. [WIP]


The src/libcontrol/* elements are the ones that should be
subclassed to implement control elements on the FFADODevice
side.

The tests/controlserver.* files contain some code that
interfaces the DBus calls to these libcontrol elements. The
DBus classes allow for introspection and path discovery,
such that we don't have to care about that anymore.

In the end it should be fairly easy to write another 'backend'
to replace the current DBus one, e.g. to implement OSC support
or MIDI support. (Should we ever want that)

Note that there is no connection between ffado and dbus yet,
this code is merely to experiment with the Control/DBus infra-
structure. Once that is sort-of working, connecting ffado to
this infrastructure is a matter of subclassing the Control::*
classes, creating them on discovery and putting them into one
Container::* that is passed on to the DBus handlers.

Line 
1 #! /usr/bin/env python
2
3 import os
4
5 Import( 'env' )
6
7 env.AppendUnique( CPPPATH=["#/", "#/src"] )
8
9 env1 = env.Copy()
10
11 ffado_source = env.Split( '\
12         devicemanager.cpp \
13         ffado.cpp \
14         ffado_streaming.cpp \
15         ffadodevice.cpp \
16         debugmodule/debugmodule.cpp \
17         libavc/streamformat/avc_extended_stream_format.cpp \
18         libavc/util/avc_serialize.cpp \
19         libavc/musicsubunit/avc_descriptor_music.cpp \
20         libavc/musicsubunit/avc_musicsubunit.cpp \
21         libavc/audiosubunit/avc_audiosubunit.cpp \
22         libavc/audiosubunit/avc_function_block.cpp \
23         libavc/descriptors/avc_descriptor_cmd.cpp \
24         libavc/descriptors/avc_descriptor.cpp \
25         libavc/general/avc_extended_subunit_info.cpp \
26         libavc/general/avc_unit_info.cpp \
27         libavc/general/avc_generic.cpp \
28         libavc/general/avc_subunit_info.cpp \
29         libavc/general/avc_connect.cpp \
30         libavc/general/avc_signal_format.cpp \
31         libavc/general/avc_extended_cmd_generic.cpp \
32         libavc/general/avc_extended_plug_info.cpp \
33         libavc/general/avc_plug_info.cpp \
34         libavc/general/avc_unit.cpp \
35         libavc/general/avc_subunit.cpp \
36         libavc/general/avc_plug.cpp \
37         libavc/general/avc_vendor_dependent_cmd.cpp \
38         libavc/avc_definitions.cpp \
39         libavc/ccm/avc_signal_source.cpp \
40         libieee1394/ARMHandler.cpp \
41         libieee1394/configrom.cpp \
42         libieee1394/csr1212.c \
43         libieee1394/ieee1394service.cpp \
44         libieee1394/IEC61883.cpp \
45         libosc/OscArgument.cpp \
46         libosc/OscClient.cpp \
47         libosc/OscMessage.cpp \
48         libosc/OscNode.cpp \
49         libosc/OscResponse.cpp \
50         libosc/OscServer.cpp \
51         libstreaming/cip.c \
52         libstreaming/IsoHandler.cpp \
53         libstreaming/IsoHandlerManager.cpp \
54         libstreaming/IsoStream.cpp \
55         libstreaming/Port.cpp \
56         libstreaming/PortManager.cpp \
57         libstreaming/StreamProcessor.cpp \
58         libstreaming/StreamProcessorManager.cpp \
59         libutil/DelayLockedLoop.cpp \
60         libutil/PacketBuffer.cpp \
61         libutil/OptionContainer.cpp \
62         libutil/PosixThread.cpp \
63         libutil/ringbuffer.c \
64         libutil/serialize.cpp \
65         libutil/StreamStatistics.cpp \
66         libutil/SystemTimeSource.cpp \
67         libutil/Time.c \
68         libutil/TimeSource.cpp \
69         libutil/TimestampedBuffer.cpp \
70         libcontrol/Element.cpp \
71         libcontrol/BasicElements.cpp \
72 ' )
73
74 bebob_source = env.Split( '\
75         bebob/bebob_avdevice.cpp \
76         bebob/bebob_avdevice_subunit.cpp \
77         bebob/bebob_avplug.cpp \
78         bebob/bebob_dl_bcd.cpp \
79         bebob/bebob_dl_codes.cpp \
80         bebob/bebob_dl_mgr.cpp \
81         bebob/bebob_functionblock.cpp \
82         bebob/GenericMixer.cpp \
83         bebob/vendorspecific/focusrite.cpp \
84         bebob/vendorspecific/terratec.cpp \
85         maudio/maudio_avdevice.cpp \
86 ' )
87 bebob_pkgdata = env.Split( '\
88         maudio/refdesign.xml \
89         maudio/fw410.xml \
90         maudio/fwap.xml \
91 ' )
92
93 genericavc_source =  env.Split( '\
94         genericavc/avc_avdevice.cpp \
95         genericavc/avc_vendormodel.cpp \
96 ' )
97
98 motu_source = env.Split( '\
99         motu/motu_avdevice.cpp \
100         libstreaming/MotuPort.cpp \
101         libstreaming/MotuPortInfo.cpp \
102         libstreaming/MotuStreamProcessor.cpp \
103 ' )
104
105 dice_source = env.Split( '\
106         dice/dice_avdevice.cpp \
107 ' )
108
109 bounce_source = env.Split( '\
110         bounce/bounce_avdevice.cpp \
111         bounce/bounce_slave_avdevice.cpp \
112         libstreaming/AmdtpSlaveStreamProcessor.cpp \
113 ' )
114
115 metric_halo_source = env.Split( '\
116         metrichalo/mh_avdevice.cpp \
117 ' )
118
119 rme_source = env.Split( '\
120         rme/rme_avdevice.cpp \
121 ' )
122
123 amdtp_source = env.Split( '\
124         libstreaming/AmdtpPort.cpp \
125         libstreaming/AmdtpPortInfo.cpp \
126         libstreaming/AmdtpStreamProcessor.cpp \
127 ' )
128
129 source = ffado_source
130 if env['ENABLE_BEBOB']:
131         source += bebob_source
132 if env['ENABLE_GENERICAVC']:
133         source += genericavc_source
134 if env['ENABLE_MOTU']:
135         source += motu_source
136 if env['ENABLE_DICE']:
137         source += dice_source
138 if env['ENABLE_METRIC_HALO']:
139         source += metric_halo_source
140 if env['ENABLE_RME']:
141         source += rme_source
142 if env['ENABLE_BOUNCE']:
143         source += bounce_source
144
145 if env['ENABLE_BEBOB'] or env['ENABLE_GENERICAVC'] or env['ENABLE_DICE'] or env['ENABLE_BOUNCE']:
146         source += amdtp_source
147
148 env1.MergeFlags( "-lrt" )
149
150 #env1.AppendUnique( LINKFLAGS = env.Split("-Wl,-rpath $libdir -Wl,-soname -Wl,libffado.so.1 --version-info=1:0:0") )
151 ffadolib = env1.SharedLibrary( "ffado", source )
152
153 #
154 # All the following tries to emulate the versioning of installed libs as seen from libtool...
155 #
156 if False:
157         print "Trying to emulate libtools versioned install"
158         env1.Alias( "install", env1.InstallAs( os.path.join('$libdir','libffado.so.$LIBVERSION'), ffadolib ) )
159         env1.Ignore( ffadolib, os.path.join('$libdir','libffado.so') )
160         #env.Ignore( os.path.join('$libdir','libffado.so'), ffadolib )
161         #env.Ignore( os.path.join('$libdir','libffado.so.0'), "install" )
162
163         env1.Alias( "install", env1.Command(
164                 target="$libdir/libffado.so",
165                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
166                 action="ln -s $SOURCE $TARGET"
167                 ) )
168         env1.Alias( "install", env1.Command(
169                 target="$libdir/libffado.so.%s" % str(env1['LIBVERSION']).rsplit('.',1)[0],
170                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
171                 action="ln -s $SOURCE $TARGET"
172                 ) )
173         env1.Alias( "install", env1.Command(
174                 target="$libdir/libffado.so.%s" % str(env1['LIBVERSION']).rsplit('.',2)[0],
175                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
176                 action="ln -s $SOURCE $TARGET"
177                 ) )
178 else:
179         print "Doing simple install"
180         env1.Alias( "install", env1.Install( "$libdir", ffadolib ) )
181
182 #
183 # Install the *_pkgdata to $sharedir
184 #
185 for data in bebob_pkgdata:
186         env1.Alias( "install", env1.Install( "$sharedir", data ) )
187
188 #
189 # For the debugging apps
190 #
191 env2 = env.Copy()
192 env2.PrependUnique( LIBPATH=env['build_base']+"src" )
193 env2.PrependUnique( LIBS="ffado" )
194
195 apps = { \
196         "bridgeco-downloader": "bridgeco-downloader.cpp", \
197         "bebob-sync" : "bebob-sync.cpp", \
198         "test-debugmodule" : "debugmodule/test_debugmodule.cpp", \
199         "test-dll" : "libutil/test-dll.cpp", \
200         "test-unittests-util" : "libutil/unittests.cpp", \
201         "test-unittests-osc" : "libosc/unittests.cpp" \
202 }
203
204 for app in apps.keys():
205         env2.Program( target=app, source = env.Split( apps[app] ) )
206
207 env2.Alias( "install", env2.Install( "$bindir", "bebob-sync" ) )
208 env2.Alias( "install", env2.Install( "$bindir", "bridgeco-downloader" ) )
209
Note: See TracBrowser for help on using the browser.