1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
import glob
import os
import re
prefix = "/usr/local/lib/pd"
platform = os.uname()[0]
if re.match("Linux", platform) != None:
OSdefine = 'UNIX'
extSuffix = '.pd_linux'
elif re.match("MINGW", platform) != None:
OSdefine = 'NT'
extSuffix = '.dll'
elif re.match("Darwin", platform) != None:
OSdefine = 'UNIX'
extSuffix = '.pd_darwin'
env = Environment(CPPPATH = Split(prefix + '/src /usr/include /usr/local/include . ../../pd/src ../../src src'), CPPDEFINES=['PD', OSdefine], SHLIBPREFIX = '', SHLIBSUFFIX = extSuffix, CCFLAGS = '-pipe -O2')
########### delete when namespace conflict issue is finally resolved
##(cyclone has all of these, the other versions are from all over the place)
delete = """
cd src && test -f prepend.c && rm urn.* match.* prepend.* sinh.c delta~.c reson~.c abs~.c svf~.c matrix~.c atan2~.c avg~.c pmpd.c && echo "poof...no more conflicting externals..!!"
"""
print os.popen(delete).read()
###########
# C sources in src/
for extra in glob.glob('src/*.c'):
external = env.SharedLibrary(re.sub("\.c$","",os.path.basename(extra)), extra)
env.Alias('install', env.Install(os.path.join(prefix, 'extra'), external))
Default(external)
env.Alias('install', env.Install(os.path.join(prefix, 'doc/5.reference'), glob.glob('doc/*.pd')))
# libraries
Export('env prefix')
for subdir in Split('ann miXed OSCx pmpd signal/expr~ unauthorized zexy'):
SConscript ('../' + subdir + '/SConscript')
|