+# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
##
# This script set linux specific flags (GNU GCC)
#
##
Import('env')
-print "Reading linux configuration script"
+print("Reading linux configuration script")
# Set release/debug flags
if env.get('RELEASE'):
else:
env.AppendUnique(CCFLAGS = ['-g'])
+# Test Coverage Flags and Library (if RELEASE=0)
+if not env.get('RELEASE') and env.get('COVERAGE_CHECKS'):
+ env.AppendUnique(CCFLAGS=['--coverage', '-fPIC', '-O0'])
+ env.AppendUnique(LINKFLAGS=['--coverage'])
+
if env.get('LOGGING'):
- env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
+ env.AppendUnique(CPPDEFINES = ['TB_LOG'])
env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__'])
env.AppendUnique(CFLAGS = ['-std=gnu99'])
env.AppendUnique(CCFLAGS = ['-Wall', '-Wextra', '-fPIC'])
-env.AppendUnique(LIBS = ['uuid'])
-env.AppendUnique(LINKFLAGS = ['-ldl', '-lpthread'])
+env.AppendUnique(LIBS = ['dl', 'pthread', 'uuid'])
# Set arch flags that match best TARGET_ARCH variable
target_arch = env.get('TARGET_ARCH')