root/branches/libffado-scons_porting_work/src/SConscript

Revision 527, 4.5 kB (checked in by arnonym, 15 years ago)

More on the installation. and the directory for the cache is now defined via config.h so adopt the devicemanager to it.

I think I have to look into libtool for the installation of libs...

And there should probably be a configure-check for the architecture, as I don't think that everybody needs the -fpic.

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
74 motu_source = env.Split( '\
75         motu/motu_avdevice.cpp \
76         libstreaming/MotuPort.cpp \
77         libstreaming/MotuPortInfo.cpp \
78         libstreaming/MotuStreamProcessor.cpp \
79 ' )
80
81 dice_source = env.Split( '\
82         dice/dice_avdevice.cpp \
83 ' )
84
85 bounce_source = env.Split( '\
86         bounce/bounce_avdevice.cpp \
87         bounce/bounce_slave_avdevice.cpp \
88         libstreaming/AmdtpSlaveStreamProcessor.cpp \
89 ' )
90
91 metric_halo_source = env.Split( '\
92         metrichalo/mh_avdevice.cpp \
93 ' )
94
95 rme_source = env.Split( '\
96         rme/rme_avdevice.cpp \
97 ' )
98
99 amdtp_source = env.Split( '\
100         libstreaming/AmdtpPort.cpp \
101         libstreaming/AmdtpPortInfo.cpp \
102         libstreaming/AmdtpStreamProcessor.cpp \
103 ' )
104
105 source = ffado_source
106 if env['ENABLE_BEBOB']:
107         source += bebob_source + amdtp_source
108 if env['ENABLE_MOTU']:
109         source += motu_source
110 if env['ENABLE_DICE']:
111         source += dice_source
112 if env['ENABLE_METRIC_HALO']:
113         source += metric_halo_source
114 if env['ENABLE_RME']:
115         source += rme_source
116 if env['ENABLE_BOUNCE']:
117         source += bounce_source
118
119 env1.AppendUnique( LINKFLAGS = env.Split("-Wl,-rpath $libdir -Wl,-soname -Wl,libffado.so.1 --version-info=1:0:0") )
120 ffadolib = env1.SharedLibrary( "ffado", source )
121
122 #
123 # All the following tries to emulate the versioning of installed libs as seen from libtool...
124 #
125 if False:
126         print "Trying to emulate libtools versioned install"
127         env1.Alias( "install", env1.InstallAs( os.path.join('$libdir','libffado.so.$LIBVERSION'), ffadolib ) )
128         env1.Ignore( ffadolib, os.path.join('$libdir','libffado.so') )
129         #env.Ignore( os.path.join('$libdir','libffado.so'), ffadolib )
130         #env.Ignore( os.path.join('$libdir','libffado.so.0'), "install" )
131
132         env1.Alias( "install", env1.Command(
133                 target="$libdir/libffado.so",
134                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
135                 action="ln -s $SOURCE $TARGET"
136                 ) )
137         env1.Alias( "install", env1.Command(
138                 target="$libdir/libffado.so.%s" % str(env1['LIBVERSION']).rsplit('.',1)[0],
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('.',2)[0],
144                 source=env1['libdir']+"/libffado.so.$LIBVERSION",
145                 action="ln -s $SOURCE $TARGET"
146                 ) )
147 else:
148         print "Doing simple install"
149         env1.Alias( "install", env1.Install( "$libdir", ffadolib ) )
150
151
152 #
153 # For the debugging apps
154 #
155 env2 = env.Copy()
156 env2.AppendUnique( LIBPATH="#/src" )
157 env2.AppendUnique( LIBS="ffado" )
158
159 apps = { \
160         "bridgeco-downloader": "bridgeco-downloader.cpp", \
161         "bebob-sync" : "bebob-sync.cpp", \
162         "test-debugmodule" : "debugmodule/test_debugmodule.cpp", \
163         "test-dll" : "libutil/test-dll.cpp", \
164         "test-unittests-util" : "libutil/unittests.cpp", \
165         "test-unittests-osc" : "libosc/unittests.cpp" \
166 }
167
168 for app in apps.keys():
169         env2.Program( target=app, source = env.Split( apps[app] ) )
170
Note: See TracBrowser for help on using the browser.