root/trunk/libffado/src/SConscript

Revision 599, 7.1 kB (checked in by wagi, 13 years ago)

Instead of static compiled in vendor/model table use configuration files.

Maybe needs some more cleanup but I wanted to check in this baby before
someone else screws me up with some majors changes in the repos :)

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