root/branches/ppalmers-streaming/src/SConscript

Revision 733, 7.3 kB (checked in by ppalmers, 14 years ago)

adapt motu code to new SP base class (compiles, needs real testing)

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