root/trunk/libffado/src/SConscript

Revision 648, 7.2 kB (checked in by ppalmers, 15 years ago)

rename saffire pro device implementation file to ease normal saffire implementation

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