root/trunk/libffado/src/SConscript

Revision 639, 7.2 kB (checked in by ppalmers, 16 years ago)

- Introduce a generic infrastructure for FFADODevices to present the clock sources they support and their state
- Implement this infrastructure for BeBoB devices
- Implement this infrastructure for ECHO Fireworks devices

Line 
1 #! /usr/bin/env python
2
3 import os
4
5 Import( 'env' )
6
7 env.AppendUnique( CPPPATH=["#/", "#/src"] )
8
9 libenv = 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/musicsubunit/avc_descriptor_music.cpp \
19         libavc/musicsubunit/avc_musicsubunit.cpp \
20         libavc/audiosubunit/avc_audiosubunit.cpp \
21         libavc/audiosubunit/avc_function_block.cpp \
22         libavc/descriptors/avc_descriptor_cmd.cpp \
23         libavc/descriptors/avc_descriptor.cpp \
24         libavc/general/avc_extended_subunit_info.cpp \
25         libavc/general/avc_unit_info.cpp \
26         libavc/general/avc_generic.cpp \
27         libavc/general/avc_subunit_info.cpp \
28         libavc/general/avc_connect.cpp \
29         libavc/general/avc_signal_format.cpp \
30         libavc/general/avc_extended_cmd_generic.cpp \
31         libavc/general/avc_extended_plug_info.cpp \
32         libavc/general/avc_plug_info.cpp \
33         libavc/general/avc_unit.cpp \
34         libavc/general/avc_subunit.cpp \
35         libavc/general/avc_plug.cpp \
36         libavc/general/avc_vendor_dependent_cmd.cpp \
37         libavc/avc_definitions.cpp \
38         libavc/ccm/avc_signal_source.cpp \
39         libieee1394/ARMHandler.cpp \
40         libieee1394/configrom.cpp \
41         libieee1394/csr1212.c \
42         libieee1394/ieee1394service.cpp \
43         libieee1394/IEC61883.cpp \
44         libosc/OscArgument.cpp \
45         libosc/OscClient.cpp \
46         libosc/OscMessage.cpp \
47         libosc/OscNode.cpp \
48         libosc/OscResponse.cpp \
49         libosc/OscServer.cpp \
50         libstreaming/cip.c \
51         libstreaming/IsoHandler.cpp \
52         libstreaming/IsoHandlerManager.cpp \
53         libstreaming/IsoStream.cpp \
54         libstreaming/Port.cpp \
55         libstreaming/PortManager.cpp \
56         libstreaming/StreamProcessor.cpp \
57         libstreaming/StreamProcessorManager.cpp \
58         libutil/cmd_serialize.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/bebob_mixer.cpp \
83         bebob/focusrite/focusrite_device.cpp \
84         bebob/focusrite/focusrite_cmd.cpp \
85         bebob/terratec/terratec_device.cpp \
86         bebob/terratec/terratec_cmd.cpp \
87         maudio/maudio_avdevice.cpp \
88 ' )
89 bebob_pkgdata = env.Split( '\
90         maudio/refdesign.xml \
91         maudio/fw410.xml \
92         maudio/fwap.xml \
93         bebob/ffado_driver_bebob.txt \
94 ' )
95
96 genericavc_source =  env.Split( '\
97         genericavc/avc_avdevice.cpp \
98         genericavc/avc_vendormodel.cpp \
99 ' )
100
101 genericavc_pkgdata = env.Split( '\
102         genericavc/ffado_driver_genericavc.txt \
103 ' )     
104
105 fireworks_source =  env.Split( '\
106         fireworks/fireworks_device.cpp \
107         fireworks/efc/efc_avc_cmd.cpp \
108         fireworks/efc/efc_cmd.cpp \
109         fireworks/efc/efc_cmds_hardware.cpp \
110         fireworks/efc/efc_cmds_hardware_ctrl.cpp \
111         fireworks/audiofire/audiofire_device.cpp \
112 ' )
113
114 fireworks_pkgdata =  env.Split( '\
115         fireworks/ffado_driver_fireworks.txt \
116 ' )
117
118 motu_source = env.Split( '\
119         motu/motu_avdevice.cpp \
120         libstreaming/MotuPort.cpp \
121         libstreaming/MotuPortInfo.cpp \
122         libstreaming/MotuStreamProcessor.cpp \
123 ' )
124
125 dice_source = env.Split( '\
126         dice/dice_avdevice.cpp \
127 ' )
128
129 bounce_source = env.Split( '\
130         bounce/bounce_avdevice.cpp \
131         bounce/bounce_slave_avdevice.cpp \
132         libstreaming/AmdtpSlaveStreamProcessor.cpp \
133 ' )
134
135 metric_halo_source = env.Split( '\
136         metrichalo/mh_avdevice.cpp \
137 ' )
138
139 rme_source = env.Split( '\
140         rme/rme_avdevice.cpp \
141 ' )
142
143 amdtp_source = env.Split( '\
144         libstreaming/AmdtpPort.cpp \
145         libstreaming/AmdtpPortInfo.cpp \
146         libstreaming/AmdtpStreamProcessor.cpp \
147 ' )
148
149 source = ffado_source
150 pkgdata = []
151 if env['ENABLE_BEBOB']:
152         libenv.AppendUnique( CCFLAGS=["-DENABLE_BEBOB"] )
153         source += bebob_source
154         pkgdata += bebob_pkgdata
155 if env['ENABLE_FIREWORKS']:
156         libenv.AppendUnique( CCFLAGS=["-DENABLE_FIREWORKS"] )
157         source += fireworks_source
158         pkgdata += fireworks_pkgdata
159 if env['ENABLE_MOTU']:
160         libenv.AppendUnique( CCFLAGS=["-DENABLE_MOTU"] )
161         source += motu_source
162 if env['ENABLE_DICE']:
163         libenv.AppendUnique( CCFLAGS=["-DENABLE_DICE"] )
164         source += dice_source
165 if env['ENABLE_METRIC_HALO']:
166         libenv.AppendUnique( CCFLAGS=["-DENABLE_METRIC_HALO"] )
167         source += metric_halo_source
168 if env['ENABLE_RME']:
169         libenv.AppendUnique( CCFLAGS=["-DENABLE_RME"] )
170         source += rme_source
171 if env['ENABLE_BOUNCE']:
172         libenv.AppendUnique( CCFLAGS=["-DENABLE_BOUNCE"] )
173         source += bounce_source
174
175 # The list of devices needing GENERICAVC is controlled in ../SConstruct
176 if env['ENABLE_GENERICAVC']:
177         libenv.AppendUnique( CCFLAGS=["-DENABLE_GENERICAVC"] )
178         source += amdtp_source
179         source += genericavc_source
180         pkgdata += genericavc_pkgdata
181
182 if not env.GetOption( "clean" ):
183         libenv.MergeFlags( "-lrt" )
184         libenv.MergeFlags( env['LIBRAW1394_FLAGS'] )
185         libenv.MergeFlags( env['LIBAVC1394_FLAGS'] )
186         libenv.MergeFlags( env['LIBIEC61883_FLAGS'] )
187         libenv.MergeFlags( env['ALSA_FLAGS'] )
188         libenv.MergeFlags( env['LIBXML26_FLAGS'] )
189         libenv.MergeFlags( env['LIBLO_FLAGS'] )
190
191 #env1.AppendUnique( LINKFLAGS = env.Split("-Wl,-rpath $libdir -Wl,-soname -Wl,libffado.so.1 --version-info=1:0:0") )
192 ffadolib = libenv.SharedLibrary( "ffado", source )
193
194 #
195 # All the following tries to emulate the versioning of installed libs as seen from libtool...
196 #
197 if False:
198         print "Trying to emulate libtools versioned install"
199         libenv.Alias( "install", libenv.InstallAs( os.path.join('$libdir','libffado.so.$LIBVERSION'), ffadolib ) )
200         libenv.Ignore( ffadolib, os.path.join('$libdir','libffado.so') )
201         #env.Ignore( os.path.join('$libdir','libffado.so'), ffadolib )
202         #env.Ignore( os.path.join('$libdir','libffado.so.0'), "install" )
203
204         libenv.Alias( "install", libenv.Command(
205                 target="$libdir/libffado.so",
206                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
207                 action="ln -s $SOURCE $TARGET"
208                 ) )
209         libenv.Alias( "install", libenv.Command(
210                 target="$libdir/libffado.so.%s" % str(libenv['LIBVERSION']).rsplit('.',1)[0],
211                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
212                 action="ln -s $SOURCE $TARGET"
213                 ) )
214         libenv.Alias( "install", libenv.Command(
215                 target="$libdir/libffado.so.%s" % str(libenv['LIBVERSION']).rsplit('.',2)[0],
216                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
217                 action="ln -s $SOURCE $TARGET"
218                 ) )
219 else:
220         #print "Doing simple install"
221         libenv.Install( "$libdir", ffadolib )
222
223 #
224 # Install the pkgdata to $sharedir
225 #
226 for data in pkgdata:
227         libenv.Install( "$sharedir", data )
228
229 #
230 # For the debugging apps
231 #
232 env2 = libenv.Copy()
233 env2.PrependUnique( LIBPATH=env['build_base']+"src" )
234 env2.PrependUnique( LIBS="ffado" )
235
236 apps = { \
237         "test-debugmodule" : "debugmodule/test_debugmodule.cpp", \
238         "test-dll" : "libutil/test-dll.cpp", \
239         "test-unittests-util" : "libutil/unittests.cpp", \
240         "test-unittests-osc" : "libosc/unittests.cpp" \
241 }
242
243 installapps = []
244
245 if env['ENABLE_BEBOB']:
246         apps["bebob-sync"] = "bebob-sync.cpp"
247         apps["bridgeco-downloader"] = "bridgeco-downloader.cpp"
248         installapps += [ "bebob-sync", "bridgeco-downloader" ]
249
250
251 for app in apps.keys():
252         env2.Program( target=app, source = env.Split( apps[app] ) )
253         if app.find( "test" ) == -1:
254                 env2.Install( "$bindir", app )
255
Note: See TracBrowser for help on using the browser.