summaryrefslogtreecommitdiff
path: root/libs/pbd3/SConscript
blob: 46089248e74fecaf8a1059d8b698aa0f4b9cccfa (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# -*- python -*-

import glob

Import('env libraries')

pbd3 = env.Copy()

domain = 'libpbd'
pbd3.Append(DOMAIN=domain,MAJOR=3,MINOR=2,MICRO=0)

pbd3_files = Split("""
basename.cc
dirname.cc
dmalloc.cc
mountpoint.cc
pathscanner.cc
pool.cc
pthread_utils.cc
receiver.cc
stacktrace.cc
strsplit.cc
textreceiver.cc
transmitter.cc
undo.cc
unescape.cc
version.cc
whitespace.cc
xml++.cc
""")

conf = Configure(pbd3)
if conf.CheckFunc('getmntent'):
    conf.env.Append(CCFLAGS="-DHAVE_GETMNTENT")
if conf.CheckCHeader('execinfo.h'):
    conf.env.Append(CXXFLAGS="-DHAVE_EXECINFO")
pbd3 = conf.Finish()

pbd3.Merge ([ libraries['sigc2'], libraries['xml'] ])

pbd3.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
pbd3.Append(CCFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")

pbd3.VersionBuild(['version.cc','pbd/version.h'], 'SConscript')

if env['DEVBUILD']:
	libpbd3 = pbd3.SharedLibrary('pbd', pbd3_files)
else:
	libpbd3 = pbd3.StaticLibrary('pbd', pbd3_files)

Default(libpbd3)

env.Alias('tarball', env.Distribute (env['DISTTREE'],
                                     [ 'SConscript' ] + pbd3_files + glob.glob('pbd/*.h')))