Imported Upstream version 1.1.0
[platform/upstream/iotivity.git] / build_common / tizen / SConscript
1 ##
2 # This script set linux specific flags (GNU GCC)
3 #
4 ##
5 import os
6 import SCons.Util
7
8 Import('env')
9
10 print "Reading linux configuration script"
11
12 # Set release/debug flags
13 if env.get('RELEASE'):
14         env.AppendUnique(CPPDEFINES = ['NDEBUG'])
15
16 if env.get('LOGGING'):
17         env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
18
19 env['CCFLAGS'] = SCons.Util.CLVar(os.environ.get('CFLAGS', ""))
20 env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__'])
21 env.AppendUnique(CFLAGS = ['-std=gnu99'])
22 env.AppendUnique(CCFLAGS = ['-Wextra', '-fPIC'])
23 env.AppendUnique(LINKFLAGS = ['-ldl', '-lpthread'])
24
25 env.AppendUnique(CCFLAGS = ['-D__TIZEN__', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE'])
26 env.ParseConfig("pkg-config dlog --cflags --libs")
27
28 # Set arch flags : It will be handled by Tizen build system.