## # This script set linux specific flags (GNU GCC) # ## import os import SCons.Util Import('env') print "Reading linux configuration script" # Set release/debug flags if env.get('RELEASE'): env.AppendUnique(CPPDEFINES = ['NDEBUG']) if env.get('LOGGING'): env.AppendUnique(CPPDEFINES = ['-DTB_LOG']) env['CCFLAGS'] = SCons.Util.CLVar(os.environ.get('CFLAGS', "")) env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__']) env.AppendUnique(CFLAGS = ['-std=gnu99']) env.AppendUnique(CCFLAGS = ['-Wextra', '-fPIC']) env.AppendUnique(LIBS = ['dl', 'pthread']) env.AppendUnique(CCFLAGS = ['-D__TIZEN__', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE','-fstack-protector-strong','-Wl,-z,relro','-D_FORTIFY_SOURCE=2']) env.ParseConfig("pkg-config dlog --cflags --libs") if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True': env.ParseConfig("pkg-config ttrace --cflags --libs") # Set arch flags : It will be handled by Tizen build system.