aboutsummaryrefslogtreecommitdiff
path: root/externals/build/SConstruct
blob: 34975c1325f5f135340e1c4d39f4bd94e7d776c8 (plain)
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
import glob
import os
import re
prefix = "/usr/local/lib/pd"

env = Environment(CPPPATH = Split(prefix + '/src /usr/local/include . src'), CPPDEFINES=['PD', 'UNIX'], SHLIBPREFIX = '', SHLIBSUFFIX = '.pd_linux', CCFLAGS = '-pipe -O2')

########### delete when namespace conflict issue is finally resolved
delete = """
test -f src/prepend.c && rm src/urn.* && rm src/match.* && rm src/prepend.* && rm src/sinh.c && rm src/delta~.c && rm src/reson~.c && rm src/abs~.c &&rm src/svf~.c &&rm src/matrix~.c &&rm src/atan2~.c && rm src/avg~.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('miXed pmpd unauthorized zexy'):
    SConscript ('../' + subdir + '/SConscript')