1
Enable support for building CsoundAC as a shared library.
2
Index: csound-5.08.0.dfsg2/SConstruct
3
===================================================================
4
--- csound-5.08.0.dfsg2.orig/SConstruct 2008-05-09 22:06:37.000000000 -0400
5
+++ csound-5.08.0.dfsg2/SConstruct 2008-05-09 22:06:46.000000000 -0400
7
acEnvironment.Append(LIBPATH = pythonLibraryPath)
8
if getPlatform() != 'darwin':
9
acEnvironment.Prepend(LIBS = pythonLibs)
10
- acEnvironment.Prepend(LIBS = ['csnd'])
11
+ acEnvironment.Prepend(LIBS = csoundInterfaces)
13
acEnvironment.Prepend(LIBS = ['_csnd'])
14
acEnvironment.Append(LINKFLAGS = libCsoundLinkFlags)
16
acEnvironment.Append(SHLINKFLAGS = '--no-export-all-symbols')
17
acEnvironment.Append(LINKFLAGS = ['-Wl,-rpath-link,.'])
18
guiProgramEnvironment.Prepend(LINKFLAGS = ['-Wl,-rpath-link,.'])
19
- os.spawnvp(os.P_WAIT, 'rm', ['rm', '-f', '_CsoundAC.so'])
20
- os.symlink('lib_CsoundAC.so', '_CsoundAC.so')
21
elif getPlatform() == 'darwin':
22
acEnvironment.Append(LIBS = ['dl', 'm'])
23
acEnvironment.Append(SHLINKFLAGS = '--no-export-all-symbols')
24
@@ -2024,7 +2022,17 @@
25
acWrapperEnvironment = acEnvironment.Copy()
26
fixCFlagsForSwig(acWrapperEnvironment)
27
if commonEnvironment['dynamicCsoundLibrary'] == '1':
28
- csoundac = acEnvironment.Library('CsoundAC', csoundAcSources)
29
+ if getPlatform() == 'linux':
30
+ os.spawnvp(os.P_WAIT, 'rm', ['rm', '-f', 'libCsoundAC.so'])
31
+ os.symlink('libCsoundAC.so.%s' % csoundLibraryVersion,
33
+ linkflags = acEnvironment['SHLINKFLAGS'] + \
34
+ [ '-Wl,-soname=libCsoundAC.so.%s' % csoundLibraryVersion ]
35
+ csoundac = acEnvironment.SharedLibrary(
36
+ 'libCsoundAC.so.%s' % csoundLibraryVersion, csoundAcSources,
37
+ SHLIBPREFIX = '', SHLIBSUFFIX = '', SHLINKFLAGS = linkflags )
39
+ csoundac = acEnvironment.Library('CsoundAC', csoundAcSources)
41
csoundac = acEnvironment.Library('CsoundAC', csoundAcSources)
44
acPythonEnvironment.Prepend(LIBPATH = pythonLibraryPath)
45
acPythonEnvironment.Prepend(LIBS = pythonLibs)
46
acPythonEnvironment.Append(CPPPATH = pythonIncludePath)
47
- acPythonEnvironment.Prepend(LIBS = ['CsoundAC'])
48
+ acPythonEnvironment.Prepend(LIBS = csoundac)
49
csoundAcPythonModule = makePythonModule(acPythonEnvironment, 'CsoundAC',
50
[csoundAcPythonWrapper])
51
if getPlatform() == 'win32' and pythonLibs[0] < 'python24' and compilerGNU():
53
pythonModules.append('CsoundAC.py')
54
counterpoint = acEnvironment.Program(
55
'counterpoint', ['frontends/CsoundAC/CounterpointMain.cpp'],
56
- LIBS = Split('CsoundAC csnd csound64'))
57
+ LIBS = [csoundInterfaces, csoundac, csoundLibrary] )
58
zipDependencies.append(counterpoint)