root/branches/libffado-scons_porting_work/src/SConscript

Revision 546, 4.7 kB (checked in by arnonym, 15 years ago)

As long as libtool isn't used, the lib shouldn't know anything about versions. Otherwise it breaks linkeage of the apps...

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         iavdevice.cpp \
16         debugmodule/debugmodule.cpp \
17         libavc/avc_connect.cpp \
18         libavc/avc_definitions.cpp \
19         libavc/avc_extended_cmd_generic.cpp \
20         libavc/avc_extended_plug_info.cpp \
21         libavc/avc_extended_stream_format.cpp \
22         libavc/avc_extended_subunit_info.cpp \
23         libavc/avc_function_block.cpp \
24         libavc/avc_generic.cpp \
25         libavc/avc_plug_info.cpp \
26         libavc/avc_serialize.cpp \
27         libavc/avc_signal_source.cpp \
28         libavc/avc_subunit_info.cpp \
29         libavc/avc_unit_info.cpp \
30         libieee1394/ARMHandler.cpp \
31         libieee1394/configrom.cpp \
32         libieee1394/csr1212.c \
33         libieee1394/ieee1394service.cpp \
34         libieee1394/IEC61883.cpp \
35         libosc/OscArgument.cpp \
36         libosc/OscClient.cpp \
37         libosc/OscMessage.cpp \
38         libosc/OscNode.cpp \
39         libosc/OscResponse.cpp \
40         libosc/OscServer.cpp \
41         libstreaming/cip.c \
42         libstreaming/IsoHandler.cpp \
43         libstreaming/IsoHandlerManager.cpp \
44         libstreaming/IsoStream.cpp \
45         libstreaming/Port.cpp \
46         libstreaming/PortManager.cpp \
47         libstreaming/StreamProcessor.cpp \
48         libstreaming/StreamProcessorManager.cpp \
49         libutil/DelayLockedLoop.cpp \
50         libutil/PacketBuffer.cpp \
51         libutil/OptionContainer.cpp \
52         libutil/PosixThread.cpp \
53         libutil/ringbuffer.c \
54         libutil/serialize.cpp \
55         libutil/StreamStatistics.cpp \
56         libutil/SystemTimeSource.cpp \
57         libutil/Time.c \
58         libutil/TimeSource.cpp \
59         libutil/TimestampedBuffer.cpp \
60 ' )
61
62 bebob_source = env.Split( '\
63         bebob/bebob_avdevice.cpp \
64         bebob/bebob_avdevice_subunit.cpp \
65         bebob/bebob_avplug.cpp \
66         bebob/bebob_dl_bcd.cpp \
67         bebob/bebob_dl_codes.cpp \
68         bebob/bebob_dl_mgr.cpp \
69         bebob/bebob_functionblock.cpp \
70         bebob/GenericMixer.cpp \
71         maudio/maudio_avdevice.cpp \
72 ' )
73 bebob_pkgdata = env.Split( '\
74         maudio/refdesign.xml \
75         maudio/fw410.xml \
76         maudio/fwap.xml \
77 ' )
78
79 motu_source = env.Split( '\
80         motu/motu_avdevice.cpp \
81         libstreaming/MotuPort.cpp \
82         libstreaming/MotuPortInfo.cpp \
83         libstreaming/MotuStreamProcessor.cpp \
84 ' )
85
86 dice_source = env.Split( '\
87         dice/dice_avdevice.cpp \
88 ' )
89
90 bounce_source = env.Split( '\
91         bounce/bounce_avdevice.cpp \
92         bounce/bounce_slave_avdevice.cpp \
93         libstreaming/AmdtpSlaveStreamProcessor.cpp \
94 ' )
95
96 metric_halo_source = env.Split( '\
97         metrichalo/mh_avdevice.cpp \
98 ' )
99
100 rme_source = env.Split( '\
101         rme/rme_avdevice.cpp \
102 ' )
103
104 amdtp_source = env.Split( '\
105         libstreaming/AmdtpPort.cpp \
106         libstreaming/AmdtpPortInfo.cpp \
107         libstreaming/AmdtpStreamProcessor.cpp \
108 ' )
109
110 source = ffado_source
111 if env['ENABLE_BEBOB']:
112         source += bebob_source + amdtp_source
113 if env['ENABLE_MOTU']:
114         source += motu_source
115 if env['ENABLE_DICE']:
116         source += dice_source
117 if env['ENABLE_METRIC_HALO']:
118         source += metric_halo_source
119 if env['ENABLE_RME']:
120         source += rme_source
121 if env['ENABLE_BOUNCE']:
122         source += bounce_source
123
124 #env1.AppendUnique( LINKFLAGS = env.Split("-Wl,-rpath $libdir -Wl,-soname -Wl,libffado.so.1 --version-info=1:0:0") )
125 ffadolib = env1.SharedLibrary( "ffado", source )
126
127 #
128 # All the following tries to emulate the versioning of installed libs as seen from libtool...
129 #
130 if False:
131         print "Trying to emulate libtools versioned install"
132         env1.Alias( "install", env1.InstallAs( os.path.join('$libdir','libffado.so.$LIBVERSION'), ffadolib ) )
133         env1.Ignore( ffadolib, os.path.join('$libdir','libffado.so') )
134         #env.Ignore( os.path.join('$libdir','libffado.so'), ffadolib )
135         #env.Ignore( os.path.join('$libdir','libffado.so.0'), "install" )
136
137         env1.Alias( "install", env1.Command(
138                 target="$libdir/libffado.so",
139                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
140                 action="ln -s $SOURCE $TARGET"
141                 ) )
142         env1.Alias( "install", env1.Command(
143                 target="$libdir/libffado.so.%s" % str(env1['LIBVERSION']).rsplit('.',1)[0],
144                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
145                 action="ln -s $SOURCE $TARGET"
146                 ) )
147         env1.Alias( "install", env1.Command(
148                 target="$libdir/libffado.so.%s" % str(env1['LIBVERSION']).rsplit('.',2)[0],
149                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
150                 action="ln -s $SOURCE $TARGET"
151                 ) )
152 else:
153         print "Doing simple install"
154         env1.Alias( "install", env1.Install( "$libdir", ffadolib ) )
155
156 #
157 # Install the *_pkgdata to $sharedir
158 #
159 for data in bebob_pkgdata:
160         env1.Alias( "install", env1.Install( "$sharedir", data ) )
161
162 #
163 # For the debugging apps
164 #
165 env2 = env.Copy()
166 env2.PrependUnique( LIBPATH="#/src" )
167 env2.PrependUnique( LIBS="ffado" )
168
169 apps = { \
170         "bridgeco-downloader": "bridgeco-downloader.cpp", \
171         "bebob-sync" : "bebob-sync.cpp", \
172         "test-debugmodule" : "debugmodule/test_debugmodule.cpp", \
173         "test-dll" : "libutil/test-dll.cpp", \
174         "test-unittests-util" : "libutil/unittests.cpp", \
175         "test-unittests-osc" : "libosc/unittests.cpp" \
176 }
177
178 for app in apps.keys():
179         env2.Program( target=app, source = env.Split( apps[app] ) )
180
Note: See TracBrowser for help on using the browser.