root/trunk/libffado/src/SConscript

Revision 1052, 8.2 kB (checked in by ppalmers, 14 years ago)

remove alsa dependency. update readme file. add some extra stuff to ffado-diag.py

Line 
1 #
2 # Copyright (C) 2007-2008 Arnold Krille
3 # Copyright (C) 2007-2008 Pieter Palmers
4 #
5 # This file is part of FFADO
6 # FFADO = Free Firewire (pro-)audio drivers for linux
7 #
8 # FFADO is based upon FreeBoB.
9 #
10 # This program is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 2 of the License, or
13 # (at your option) version 3 of the License.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 #
23
24 import os
25
26 Import( 'env' )
27
28 env.AppendUnique( CPPPATH=["#/", "#/src"] )
29
30 libenv = env.Copy()
31
32 ffado_source = env.Split( '\
33         devicemanager.cpp \
34         ffado.cpp \
35         ffadodevice.cpp \
36         debugmodule/debugmodule.cpp \
37         DeviceStringParser.cpp \
38         libavc/streamformat/avc_extended_stream_format.cpp \
39         libavc/musicsubunit/avc_descriptor_music.cpp \
40         libavc/musicsubunit/avc_musicsubunit.cpp \
41         libavc/audiosubunit/avc_audiosubunit.cpp \
42         libavc/audiosubunit/avc_function_block.cpp \
43         libavc/descriptors/avc_descriptor_cmd.cpp \
44         libavc/descriptors/avc_descriptor.cpp \
45         libavc/general/avc_extended_subunit_info.cpp \
46         libavc/general/avc_unit_info.cpp \
47         libavc/general/avc_generic.cpp \
48         libavc/general/avc_subunit_info.cpp \
49         libavc/general/avc_connect.cpp \
50         libavc/general/avc_signal_format.cpp \
51         libavc/general/avc_extended_cmd_generic.cpp \
52         libavc/general/avc_extended_plug_info.cpp \
53         libavc/general/avc_plug_info.cpp \
54         libavc/general/avc_unit.cpp \
55         libavc/general/avc_subunit.cpp \
56         libavc/general/avc_plug.cpp \
57         libavc/general/avc_vendor_dependent_cmd.cpp \
58         libavc/avc_definitions.cpp \
59         libavc/ccm/avc_signal_source.cpp \
60         libieee1394/ARMHandler.cpp \
61         libieee1394/configrom.cpp \
62         libieee1394/csr1212.c \
63         libieee1394/CycleTimerHelper.cpp \
64         libieee1394/ieee1394service.cpp \
65         libieee1394/IEC61883.cpp \
66         libieee1394/IsoHandler.cpp \
67         libieee1394/IsoHandlerManager.cpp \
68         libstreaming/StreamProcessorManager.cpp \
69         libstreaming/util/cip.c \
70         libstreaming/generic/StreamProcessor.cpp \
71         libstreaming/generic/Port.cpp \
72         libstreaming/generic/PortManager.cpp \
73         libutil/cmd_serialize.cpp \
74         libutil/DelayLockedLoop.cpp \
75         libutil/PacketBuffer.cpp \
76         libutil/OptionContainer.cpp \
77         libutil/PosixMutex.cpp \
78         libutil/PosixThread.cpp \
79         libutil/ringbuffer.c \
80         libutil/serialize.cpp \
81         libutil/StreamStatistics.cpp \
82         libutil/SystemTimeSource.cpp \
83         libutil/TimestampedBuffer.cpp \
84         libutil/Watchdog.cpp \
85         libcontrol/Element.cpp \
86         libcontrol/BasicElements.cpp \
87         libcontrol/MatrixMixer.cpp \
88         libcontrol/ClockSelect.cpp \
89 ')
90
91 bebob_source = env.Split( '\
92         bebob/bebob_avdevice.cpp \
93         bebob/bebob_avdevice_subunit.cpp \
94         bebob/bebob_avplug.cpp \
95         bebob/bebob_dl_bcd.cpp \
96         bebob/bebob_dl_codes.cpp \
97         bebob/bebob_dl_mgr.cpp \
98         bebob/bebob_functionblock.cpp \
99         bebob/bebob_mixer.cpp \
100         bebob/focusrite/focusrite_generic.cpp \
101         bebob/focusrite/focusrite_saffire.cpp \
102         bebob/focusrite/focusrite_saffirepro.cpp \
103         bebob/focusrite/focusrite_cmd.cpp \
104         bebob/terratec/terratec_device.cpp \
105         bebob/terratec/terratec_cmd.cpp \
106         maudio/maudio_avdevice.cpp \
107 ' )
108 bebob_pkgdata = env.Split( '\
109         maudio/refdesign.xml \
110         maudio/fw410.xml \
111         maudio/fwap.xml \
112         bebob/ffado_driver_bebob.txt \
113 ' )
114
115 genericavc_source =  env.Split( '\
116         genericavc/avc_avdevice.cpp \
117         genericavc/avc_vendormodel.cpp \
118 ' )
119
120 genericavc_pkgdata = env.Split( '\
121         genericavc/ffado_driver_genericavc.txt \
122 ' )     
123
124 fireworks_source =  env.Split( '\
125         fireworks/fireworks_device.cpp \
126         fireworks/fireworks_control.cpp \
127         fireworks/fireworks_firmware.cpp \
128         fireworks/efc/efc_avc_cmd.cpp \
129         fireworks/efc/efc_cmd.cpp \
130         fireworks/efc/efc_cmds_hardware.cpp \
131         fireworks/efc/efc_cmds_hardware_ctrl.cpp \
132         fireworks/efc/efc_cmds_flash.cpp \
133         fireworks/efc/efc_cmds_mixer.cpp \
134         fireworks/efc/efc_cmds_monitor.cpp \
135         fireworks/efc/efc_cmds_ioconfig.cpp \
136         fireworks/audiofire/audiofire_device.cpp \
137 ' )
138
139 fireworks_pkgdata =  env.Split( '\
140         fireworks/ffado_driver_fireworks.txt \
141 ' )
142
143 motu_source = env.Split( '\
144         motu/motu_avdevice.cpp \
145         motu/motu_controls.cpp \
146         libstreaming/motu/MotuPort.cpp \
147         libstreaming/motu/MotuPortInfo.cpp \
148         libstreaming/motu/MotuReceiveStreamProcessor.cpp \
149         libstreaming/motu/MotuTransmitStreamProcessor.cpp \
150 ' )
151
152 dice_source = env.Split( '\
153         dice/dice_avdevice.cpp \
154 ' )
155
156 bounce_source = env.Split( '\
157         bounce/bounce_avdevice.cpp \
158         bounce/bounce_slave_avdevice.cpp \
159         libstreaming/AmdtpSlaveStreamProcessor.cpp \
160 ' )
161
162 metric_halo_source = env.Split( '\
163         metrichalo/mh_avdevice.cpp \
164 ' )
165
166 rme_source = env.Split( '\
167         rme/rme_avdevice.cpp \
168 ' )
169
170 amdtp_source = env.Split( '\
171         libstreaming/amdtp/AmdtpPort.cpp \
172         libstreaming/amdtp/AmdtpPortInfo.cpp \
173         libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp \
174         libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp \
175 ' )
176
177
178 source = ffado_source
179 pkgdata = []
180 if env['ENABLE_BEBOB']:
181         libenv.AppendUnique( CCFLAGS=["-DENABLE_BEBOB"] )
182         source += bebob_source
183         pkgdata += bebob_pkgdata
184 if env['ENABLE_FIREWORKS']:
185         libenv.AppendUnique( CCFLAGS=["-DENABLE_FIREWORKS"] )
186         source += fireworks_source
187         pkgdata += fireworks_pkgdata
188 if env['ENABLE_MOTU']:
189         libenv.AppendUnique( CCFLAGS=["-DENABLE_MOTU"] )
190         source += motu_source
191 if env['ENABLE_DICE']:
192         libenv.AppendUnique( CCFLAGS=["-DENABLE_DICE"] )
193         source += dice_source
194 if env['ENABLE_METRIC_HALO']:
195         libenv.AppendUnique( CCFLAGS=["-DENABLE_METRIC_HALO"] )
196         source += metric_halo_source
197 if env['ENABLE_RME']:
198         libenv.AppendUnique( CCFLAGS=["-DENABLE_RME"] )
199         source += rme_source
200 if env['ENABLE_BOUNCE']:
201         libenv.AppendUnique( CCFLAGS=["-DENABLE_BOUNCE"] )
202         source += bounce_source
203
204 # The list of devices needing GENERICAVC is controlled in ../SConstruct
205 if env['ENABLE_GENERICAVC']:
206         libenv.AppendUnique( CCFLAGS=["-DENABLE_GENERICAVC"] )
207         source += amdtp_source
208         source += genericavc_source
209         pkgdata += genericavc_pkgdata
210
211 if not env.GetOption( "clean" ):
212         libenv.MergeFlags( "-lrt" )
213         libenv.MergeFlags( env['LIBRAW1394_FLAGS'] )
214         libenv.MergeFlags( env['LIBAVC1394_FLAGS'] )
215         libenv.MergeFlags( env['LIBIEC61883_FLAGS'] )
216         libenv.MergeFlags( env['LIBXML26_FLAGS'] )
217
218 #env1.AppendUnique( LINKFLAGS = env.Split("-Wl,-rpath $libdir -Wl,-soname -Wl,libffado.so.1 --version-info=1:0:0") )
219 ffadolib = libenv.SharedLibrary( "ffado", source )
220
221 if libenv['BUILD_STATIC_LIB']:
222     ffadolib_static = libenv.StaticLibrary( "ffado", source )
223
224 #
225 # All the following tries to emulate the versioning of installed libs as seen from libtool...
226 #
227 if False:
228         print "Trying to emulate libtools versioned install"
229         libenv.Alias( "install", libenv.InstallAs( os.path.join('$libdir','libffado.so.$LIBVERSION'), ffadolib ) )
230         libenv.Ignore( ffadolib, os.path.join('$libdir','libffado.so') )
231         #env.Ignore( os.path.join('$libdir','libffado.so'), ffadolib )
232         #env.Ignore( os.path.join('$libdir','libffado.so.0'), "install" )
233
234         libenv.Alias( "install", libenv.Command(
235                 target="$libdir/libffado.so",
236                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
237                 action="ln -s $SOURCE $TARGET"
238                 ) )
239         libenv.Alias( "install", libenv.Command(
240                 target="$libdir/libffado.so.%s" % str(libenv['LIBVERSION']).rsplit('.',1)[0],
241                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
242                 action="ln -s $SOURCE $TARGET"
243                 ) )
244         libenv.Alias( "install", libenv.Command(
245                 target="$libdir/libffado.so.%s" % str(libenv['LIBVERSION']).rsplit('.',2)[0],
246                 source=libenv['libdir']+"/libffado.so.$LIBVERSION",
247                 action="ln -s $SOURCE $TARGET"
248                 ) )
249 else:
250         #print "Doing simple install"
251         libenv.Install( "$libdir", ffadolib )
252
253 #
254 # Install the pkgdata to $sharedir
255 #
256 for data in pkgdata:
257         libenv.Install( "$sharedir", data )
258
259 #
260 # For the debugging apps
261 #
262 env2 = libenv.Copy()
263 env2.PrependUnique( LIBPATH=env['build_base']+"src" )
264 env2.PrependUnique( LIBS="ffado" )
265
266 apps = { \
267         "test-debugmodule" : "debugmodule/test_debugmodule.cpp", \
268         "test-dll" : "libutil/test-dll.cpp", \
269         "test-unittests-util" : "libutil/unittests.cpp", \
270         "test-cyclecalc" : "libieee1394/test-cyclecalc.cpp", \
271 }
272
273 installapps = []
274
275 for app in apps.keys():
276         env2.Program( target=app, source = env.Split( apps[app] ) )
277         if app.find( "test" ) == -1:
278                 env2.Install( "$bindir", app )
279
Note: See TracBrowser for help on using the browser.