root/trunk/libffado/src/SConscript

Revision 587, 6.0 kB (checked in by ppalmers, 17 years ago)

- moved all vendor id's to one include file
- introduced the framework for the ECHO FireWorks? platform

Line 
1 #! /usr/bin/env python
2
3 import os
4
5 Import( 'env' )
6
7 env.AppendUnique( CPPPATH=["#/", "#/src"] )
8
9 env1 = 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 ' )
94
95 genericavc_source =  env.Split( '\
96         genericavc/avc_avdevice.cpp \
97         genericavc/avc_vendormodel.cpp \
98 ' )
99
100 fireworks_source =  env.Split( '\
101         fireworks/fireworks_device.cpp \
102         fireworks/audiofire/audiofire_device.cpp \
103 ' )
104
105 motu_source = env.Split( '\
106         motu/motu_avdevice.cpp \
107         libstreaming/MotuPort.cpp \
108         libstreaming/MotuPortInfo.cpp \
109         libstreaming/MotuStreamProcessor.cpp \
110 ' )
111
112 dice_source = env.Split( '\
113         dice/dice_avdevice.cpp \
114 ' )
115
116 bounce_source = env.Split( '\
117         bounce/bounce_avdevice.cpp \
118         bounce/bounce_slave_avdevice.cpp \
119         libstreaming/AmdtpSlaveStreamProcessor.cpp \
120 ' )
121
122 metric_halo_source = env.Split( '\
123         metrichalo/mh_avdevice.cpp \
124 ' )
125
126 rme_source = env.Split( '\
127         rme/rme_avdevice.cpp \
128 ' )
129
130 amdtp_source = env.Split( '\
131         libstreaming/AmdtpPort.cpp \
132         libstreaming/AmdtpPortInfo.cpp \
133         libstreaming/AmdtpStreamProcessor.cpp \
134 ' )
135
136 source = ffado_source
137 if env['ENABLE_BEBOB']:
138         source += bebob_source
139 if env['ENABLE_FIREWORKS']:
140         source += fireworks_source
141 if env['ENABLE_MOTU']:
142         source += motu_source
143 if env['ENABLE_DICE']:
144         source += dice_source
145 if env['ENABLE_METRIC_HALO']:
146         source += metric_halo_source
147 if env['ENABLE_RME']:
148         source += rme_source
149 if env['ENABLE_BOUNCE']:
150         source += bounce_source
151
152 if env['ENABLE_BEBOB'] or env['ENABLE_DICE'] or env['ENABLE_BOUNCE'] or env['ENABLE_FIREWORKS']:
153         source += amdtp_source
154         source += genericavc_source
155
156 env1.MergeFlags( "-lrt" )
157
158 #env1.AppendUnique( LINKFLAGS = env.Split("-Wl,-rpath $libdir -Wl,-soname -Wl,libffado.so.1 --version-info=1:0:0") )
159 ffadolib = env1.SharedLibrary( "ffado", source )
160
161 #
162 # All the following tries to emulate the versioning of installed libs as seen from libtool...
163 #
164 if False:
165         print "Trying to emulate libtools versioned install"
166         env1.Alias( "install", env1.InstallAs( os.path.join('$libdir','libffado.so.$LIBVERSION'), ffadolib ) )
167         env1.Ignore( ffadolib, os.path.join('$libdir','libffado.so') )
168         #env.Ignore( os.path.join('$libdir','libffado.so'), ffadolib )
169         #env.Ignore( os.path.join('$libdir','libffado.so.0'), "install" )
170
171         env1.Alias( "install", env1.Command(
172                 target="$libdir/libffado.so",
173                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
174                 action="ln -s $SOURCE $TARGET"
175                 ) )
176         env1.Alias( "install", env1.Command(
177                 target="$libdir/libffado.so.%s" % str(env1['LIBVERSION']).rsplit('.',1)[0],
178                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
179                 action="ln -s $SOURCE $TARGET"
180                 ) )
181         env1.Alias( "install", env1.Command(
182                 target="$libdir/libffado.so.%s" % str(env1['LIBVERSION']).rsplit('.',2)[0],
183                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
184                 action="ln -s $SOURCE $TARGET"
185                 ) )
186 else:
187         print "Doing simple install"
188         env1.Alias( "install", env1.Install( "$libdir", ffadolib ) )
189
190 #
191 # Install the *_pkgdata to $sharedir
192 #
193 for data in bebob_pkgdata:
194         env1.Alias( "install", env1.Install( "$sharedir", data ) )
195
196 #
197 # For the debugging apps
198 #
199 env2 = env.Copy()
200 env2.PrependUnique( LIBPATH=env['build_base']+"src" )
201 env2.PrependUnique( LIBS="ffado" )
202
203 apps = { \
204         "bridgeco-downloader": "bridgeco-downloader.cpp", \
205         "bebob-sync" : "bebob-sync.cpp", \
206         "test-debugmodule" : "debugmodule/test_debugmodule.cpp", \
207         "test-dll" : "libutil/test-dll.cpp", \
208         "test-unittests-util" : "libutil/unittests.cpp", \
209         "test-unittests-osc" : "libosc/unittests.cpp" \
210 }
211
212 for app in apps.keys():
213         env2.Program( target=app, source = env.Split( apps[app] ) )
214
215 env2.Alias( "install", env2.Install( "$bindir", "bebob-sync" ) )
216 env2.Alias( "install", env2.Install( "$bindir", "bridgeco-downloader" ) )
217
Note: See TracBrowser for help on using the browser.