root/trunk/libffado/src/SConscript

Revision 688, 7.3 kB (checked in by ppalmers, 16 years ago)

- Remove bebob sync tool, since this is now generalized into the FFADODevice API.

the sync source can be set with tests/test-ffado

- introduce a new directory for firmware tools: support/firmware
- Move the bridgeco firmware downloader to the support/firmware directory
- initial code for echo firmware downloading

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         libcontrol/MatrixMixer.cpp \
73 ' )
74
75 bebob_source = env.Split( '\
76         bebob/bebob_avdevice.cpp \
77         bebob/bebob_avdevice_subunit.cpp \
78         bebob/bebob_avplug.cpp \
79         bebob/bebob_dl_bcd.cpp \
80         bebob/bebob_dl_codes.cpp \
81         bebob/bebob_dl_mgr.cpp \
82         bebob/bebob_functionblock.cpp \
83         bebob/bebob_mixer.cpp \
84         bebob/focusrite/focusrite_generic.cpp \
85         bebob/focusrite/focusrite_saffire.cpp \
86         bebob/focusrite/focusrite_saffirepro.cpp \
87         bebob/focusrite/focusrite_cmd.cpp \
88         bebob/terratec/terratec_device.cpp \
89         bebob/terratec/terratec_cmd.cpp \
90         maudio/maudio_avdevice.cpp \
91 ' )
92 bebob_pkgdata = env.Split( '\
93         maudio/refdesign.xml \
94         maudio/fw410.xml \
95         maudio/fwap.xml \
96         bebob/ffado_driver_bebob.txt \
97 ' )
98
99 genericavc_source =  env.Split( '\
100         genericavc/avc_avdevice.cpp \
101         genericavc/avc_vendormodel.cpp \
102 ' )
103
104 genericavc_pkgdata = env.Split( '\
105         genericavc/ffado_driver_genericavc.txt \
106 ' )     
107
108 fireworks_source =  env.Split( '\
109         fireworks/fireworks_device.cpp \
110         fireworks/fireworks_control.cpp \
111         fireworks/fireworks_firmware.cpp \
112         fireworks/efc/efc_avc_cmd.cpp \
113         fireworks/efc/efc_cmd.cpp \
114         fireworks/efc/efc_cmds_hardware.cpp \
115         fireworks/efc/efc_cmds_hardware_ctrl.cpp \
116         fireworks/efc/efc_cmds_flash.cpp \
117         fireworks/efc/efc_cmds_mixer.cpp \
118         fireworks/efc/efc_cmds_monitor.cpp \
119         fireworks/efc/efc_cmds_ioconfig.cpp \
120         fireworks/audiofire/audiofire_device.cpp \
121 ' )
122
123 fireworks_pkgdata =  env.Split( '\
124         fireworks/ffado_driver_fireworks.txt \
125 ' )
126
127 motu_source = env.Split( '\
128         motu/motu_avdevice.cpp \
129         libstreaming/MotuPort.cpp \
130         libstreaming/MotuPortInfo.cpp \
131         libstreaming/MotuStreamProcessor.cpp \
132 ' )
133
134 dice_source = env.Split( '\
135         dice/dice_avdevice.cpp \
136 ' )
137
138 bounce_source = env.Split( '\
139         bounce/bounce_avdevice.cpp \
140         bounce/bounce_slave_avdevice.cpp \
141         libstreaming/AmdtpSlaveStreamProcessor.cpp \
142 ' )
143
144 metric_halo_source = env.Split( '\
145         metrichalo/mh_avdevice.cpp \
146 ' )
147
148 rme_source = env.Split( '\
149         rme/rme_avdevice.cpp \
150 ' )
151
152 amdtp_source = env.Split( '\
153         libstreaming/AmdtpPort.cpp \
154         libstreaming/AmdtpPortInfo.cpp \
155         libstreaming/AmdtpStreamProcessor.cpp \
156 ' )
157
158 source = ffado_source
159 pkgdata = []
160 if env['ENABLE_BEBOB']:
161         libenv.AppendUnique( CCFLAGS=["-DENABLE_BEBOB"] )
162         source += bebob_source
163         pkgdata += bebob_pkgdata
164 if env['ENABLE_FIREWORKS']:
165         libenv.AppendUnique( CCFLAGS=["-DENABLE_FIREWORKS"] )
166         source += fireworks_source
167         pkgdata += fireworks_pkgdata
168 if env['ENABLE_MOTU']:
169         libenv.AppendUnique( CCFLAGS=["-DENABLE_MOTU"] )
170         source += motu_source
171 if env['ENABLE_DICE']:
172         libenv.AppendUnique( CCFLAGS=["-DENABLE_DICE"] )
173         source += dice_source
174 if env['ENABLE_METRIC_HALO']:
175         libenv.AppendUnique( CCFLAGS=["-DENABLE_METRIC_HALO"] )
176         source += metric_halo_source
177 if env['ENABLE_RME']:
178         libenv.AppendUnique( CCFLAGS=["-DENABLE_RME"] )
179         source += rme_source
180 if env['ENABLE_BOUNCE']:
181         libenv.AppendUnique( CCFLAGS=["-DENABLE_BOUNCE"] )
182         source += bounce_source
183
184 # The list of devices needing GENERICAVC is controlled in ../SConstruct
185 if env['ENABLE_GENERICAVC']:
186         libenv.AppendUnique( CCFLAGS=["-DENABLE_GENERICAVC"] )
187         source += amdtp_source
188         source += genericavc_source
189         pkgdata += genericavc_pkgdata
190
191 if not env.GetOption( "clean" ):
192         libenv.MergeFlags( "-lrt" )
193         libenv.MergeFlags( env['LIBRAW1394_FLAGS'] )
194         libenv.MergeFlags( env['LIBAVC1394_FLAGS'] )
195         libenv.MergeFlags( env['LIBIEC61883_FLAGS'] )
196         libenv.MergeFlags( env['ALSA_FLAGS'] )
197         libenv.MergeFlags( env['LIBXML26_FLAGS'] )
198         libenv.MergeFlags( env['LIBLO_FLAGS'] )
199
200 #env1.AppendUnique( LINKFLAGS = env.Split("-Wl,-rpath $libdir -Wl,-soname -Wl,libffado.so.1 --version-info=1:0:0") )
201 ffadolib = libenv.SharedLibrary( "ffado", source )
202
203 #
204 # All the following tries to emulate the versioning of installed libs as seen from libtool...
205 #
206 if False:
207         print "Trying to emulate libtools versioned install"
208         libenv.Alias( "install", libenv.InstallAs( os.path.join('$libdir','libffado.so.$LIBVERSION'), ffadolib ) )
209         libenv.Ignore( ffadolib, os.path.join('$libdir','libffado.so') )
210         #env.Ignore( os.path.join('$libdir','libffado.so'), ffadolib )
211         #env.Ignore( os.path.join('$libdir','libffado.so.0'), "install" )
212
213         libenv.Alias( "install", libenv.Command(
214                 target="$libdir/libffado.so",
215                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
216                 action="ln -s $SOURCE $TARGET"
217                 ) )
218         libenv.Alias( "install", libenv.Command(
219                 target="$libdir/libffado.so.%s" % str(libenv['LIBVERSION']).rsplit('.',1)[0],
220                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
221                 action="ln -s $SOURCE $TARGET"
222                 ) )
223         libenv.Alias( "install", libenv.Command(
224                 target="$libdir/libffado.so.%s" % str(libenv['LIBVERSION']).rsplit('.',2)[0],
225                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
226                 action="ln -s $SOURCE $TARGET"
227                 ) )
228 else:
229         #print "Doing simple install"
230         libenv.Install( "$libdir", ffadolib )
231
232 #
233 # Install the pkgdata to $sharedir
234 #
235 for data in pkgdata:
236         libenv.Install( "$sharedir", data )
237
238 #
239 # For the debugging apps
240 #
241 env2 = libenv.Copy()
242 env2.PrependUnique( LIBPATH=env['build_base']+"src" )
243 env2.PrependUnique( LIBS="ffado" )
244
245 apps = { \
246         "test-debugmodule" : "debugmodule/test_debugmodule.cpp", \
247         "test-dll" : "libutil/test-dll.cpp", \
248         "test-unittests-util" : "libutil/unittests.cpp", \
249         "test-unittests-osc" : "libosc/unittests.cpp" \
250 }
251
252 installapps = []
253
254 for app in apps.keys():
255         env2.Program( target=app, source = env.Split( apps[app] ) )
256         if app.find( "test" ) == -1:
257                 env2.Install( "$bindir", app )
258
Note: See TracBrowser for help on using the browser.