File: SConstruct

package info (click to toggle)
atom4 4.1-9
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 836 kB
  • ctags: 1,222
  • sloc: cpp: 4,451; makefile: 46; perl: 6
file content (51 lines) | stat: -rw-r--r-- 1,026 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/scons
#
# Library build script.
#
# Configurable parameters: (run with 'cons $VARNAME=$VALUE ...')
#
# CC=$binary		C compiler to use (default: gcc)
# CXX=$binary		C++ compiler to use (default: g++)
# ADIR=$dir		Where to install .a files
# INCDIR=$dir		Where to install header files
# SODIR=$dir		Where to install .so files (currently not implemented)
# DEBUG=1		Build with debugging symbols
#


#
# Externally configurable settings
#

cc     = ARGUMENTS.get('CC', 'gcc')
cxx    = ARGUMENTS.get('CXX', 'g++')
adir   = ARGUMENTS.get('ADIR', '#lib')
incdir = ARGUMENTS.get('INCDIR', '#include')
sodir  = ARGUMENTS.get('SODIR', '#lib')

#
# Internal setup
#

debugflag = '-g3' if ARGUMENTS.get('DEBUG') else ''
cflags = [
	'-pedantic', '-Wall', debugflag
]
cxxflags = cflags
incpaths = incdir

env = Environment(
  CC       = cc,
  CFLAGS   = cflags,
  CXX      = cxx,
  CXXFLAGS = cxxflags,
  CPPPATH  = incpaths
)

Export('adir', 'incdir', 'sodir', 'env')

SConscript(Split("""
  c++/SConscript
  c/SConscript
"""))