root/branches/ppalmers-streaming/src/SConscript

Revision 730, 7.2 kB (checked in by ppalmers, 13 years ago)

- Remove OSC related code
- create DBus server application
- add "scons debian" target that builds a debian package

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/MotuStreamProcessor.cpp \
126 ' )
127
128 dice_source = env.Split( '\
129         dice/dice_avdevice.cpp \
130 ' )
131
132 bounce_source = env.Split( '\
133         bounce/bounce_avdevice.cpp \
134         bounce/bounce_slave_avdevice.cpp \
135         libstreaming/AmdtpSlaveStreamProcessor.cpp \
136 ' )
137
138 metric_halo_source = env.Split( '\
139         metrichalo/mh_avdevice.cpp \
140 ' )
141
142 rme_source = env.Split( '\
143         rme/rme_avdevice.cpp \
144 ' )
145
146 amdtp_source = env.Split( '\
147         libstreaming/amdtp/AmdtpPort.cpp \
148         libstreaming/amdtp/AmdtpPortInfo.cpp \
149         libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp \
150         libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp \
151 ' )
152
153 source = ffado_source
154 pkgdata = []
155 if env['ENABLE_BEBOB']:
156         libenv.AppendUnique( CCFLAGS=["-DENABLE_BEBOB"] )
157         source += bebob_source
158         pkgdata += bebob_pkgdata
159 if env['ENABLE_FIREWORKS']:
160         libenv.AppendUnique( CCFLAGS=["-DENABLE_FIREWORKS"] )
161         source += fireworks_source
162         pkgdata += fireworks_pkgdata
163 if env['ENABLE_MOTU']:
164         libenv.AppendUnique( CCFLAGS=["-DENABLE_MOTU"] )
165         source += motu_source
166 if env['ENABLE_DICE']:
167         libenv.AppendUnique( CCFLAGS=["-DENABLE_DICE"] )
168         source += dice_source
169 if env['ENABLE_METRIC_HALO']:
170         libenv.AppendUnique( CCFLAGS=["-DENABLE_METRIC_HALO"] )
171         source += metric_halo_source
172 if env['ENABLE_RME']:
173         libenv.AppendUnique( CCFLAGS=["-DENABLE_RME"] )
174         source += rme_source
175 if env['ENABLE_BOUNCE']:
176         libenv.AppendUnique( CCFLAGS=["-DENABLE_BOUNCE"] )
177         source += bounce_source
178
179 # The list of devices needing GENERICAVC is controlled in ../SConstruct
180 if env['ENABLE_GENERICAVC']:
181         libenv.AppendUnique( CCFLAGS=["-DENABLE_GENERICAVC"] )
182         source += amdtp_source
183         source += genericavc_source
184         pkgdata += genericavc_pkgdata
185
186 if not env.GetOption( "clean" ):
187         libenv.MergeFlags( "-lrt" )
188         libenv.MergeFlags( env['LIBRAW1394_FLAGS'] )
189         libenv.MergeFlags( env['LIBAVC1394_FLAGS'] )
190         libenv.MergeFlags( env['LIBIEC61883_FLAGS'] )
191         libenv.MergeFlags( env['ALSA_FLAGS'] )
192         libenv.MergeFlags( env['LIBXML26_FLAGS'] )
193
194 #env1.AppendUnique( LINKFLAGS = env.Split("-Wl,-rpath $libdir -Wl,-soname -Wl,libffado.so.1 --version-info=1:0:0") )
195 ffadolib = libenv.SharedLibrary( "ffado", source )
196
197 #
198 # All the following tries to emulate the versioning of installed libs as seen from libtool...
199 #
200 if False:
201         print "Trying to emulate libtools versioned install"
202         libenv.Alias( "install", libenv.InstallAs( os.path.join('$libdir','libffado.so.$LIBVERSION'), ffadolib ) )
203         libenv.Ignore( ffadolib, os.path.join('$libdir','libffado.so') )
204         #env.Ignore( os.path.join('$libdir','libffado.so'), ffadolib )
205         #env.Ignore( os.path.join('$libdir','libffado.so.0'), "install" )
206
207         libenv.Alias( "install", libenv.Command(
208                 target="$libdir/libffado.so",
209                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
210                 action="ln -s $SOURCE $TARGET"
211                 ) )
212         libenv.Alias( "install", libenv.Command(
213                 target="$libdir/libffado.so.%s" % str(libenv['LIBVERSION']).rsplit('.',1)[0],
214                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
215                 action="ln -s $SOURCE $TARGET"
216                 ) )
217         libenv.Alias( "install", libenv.Command(
218                 target="$libdir/libffado.so.%s" % str(libenv['LIBVERSION']).rsplit('.',2)[0],
219                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
220                 action="ln -s $SOURCE $TARGET"
221                 ) )
222 else:
223         #print "Doing simple install"
224         libenv.Install( "$libdir", ffadolib )
225
226 #
227 # Install the pkgdata to $sharedir
228 #
229 for data in pkgdata:
230         libenv.Install( "$sharedir", data )
231
232 #
233 # For the debugging apps
234 #
235 env2 = libenv.Copy()
236 env2.PrependUnique( LIBPATH=env['build_base']+"src" )
237 env2.PrependUnique( LIBS="ffado" )
238
239 apps = { \
240         "test-debugmodule" : "debugmodule/test_debugmodule.cpp", \
241         "test-dll" : "libutil/test-dll.cpp", \
242         "test-unittests-util" : "libutil/unittests.cpp", \
243 }
244
245 installapps = []
246
247 for app in apps.keys():
248         env2.Program( target=app, source = env.Split( apps[app] ) )
249         if app.find( "test" ) == -1:
250                 env2.Install( "$bindir", app )
251
Note: See TracBrowser for help on using the browser.