Debian Codegraph @

proglib/SConstruct

raw ◀ ▶
1 Debian patch touch this file
•1 #!/usr/bin/scons
2 #
3 # Library build script.
4 #
5 # Configurable parameters: (run with 'cons $VARNAME=$VALUE ...')
6 #
7 # CC=$binary C compiler to use (default: gcc)
8 # CXX=$binary C++ compiler to use (default: g++)
9 # ADIR=$dir Where to install .a files
10 # INCDIR=$dir Where to install header files
11 # SODIR=$dir Where to install .so files (currently not implemented)
12 # DEBUG=1 Build with debugging symbols
13 #
14
15
16 #
17 # Externally configurable settings
18 #
19
20 cc = ARGUMENTS.get('CC', 'gcc')
21 cxx = ARGUMENTS.get('CXX', 'g++')
22 adir = ARGUMENTS.get('ADIR', '#lib')
23 incdir = ARGUMENTS.get('INCDIR', '#include')
24 sodir = ARGUMENTS.get('SODIR', '#lib')
25
26 #
27 # Internal setup
28 #
29
30 debugflag = '-g3' if ARGUMENTS.get('DEBUG') else ''
31 cflags = [
32 '-pedantic', '-Wall', debugflag
33 ]
34 cxxflags = cflags
35 incpaths = incdir
36
37 env = Environment(
38 CC = cc,
39 CFLAGS = cflags,
40 CXX = cxx,
41 CXXFLAGS = cxxflags,
42 CPPPATH = incpaths
43 )
44
45 Export('adir', 'incdir', 'sodir', 'env')
46
47 SConscript(Split("""
48 c++/SConscript
49 c/SConscript
50 """))
51