• Home
  • Raw
  • Download

Lines Matching full:env

17 env = Environment(ENV = os.environ, tools = ['default', 'nanopb'])
20 if 'CC' in ARGUMENTS: env.Replace(CC = ARGUMENTS['CC'])
21 if 'CXX' in ARGUMENTS: env.Replace(CXX = ARGUMENTS['CXX'])
22 if 'CCFLAGS' in ARGUMENTS: env.Append(CCFLAGS = ARGUMENTS['CCFLAGS'])
23 if 'CXXFLAGS' in ARGUMENTS: env.Append(CXXFLAGS = ARGUMENTS['CXXFLAGS'])
26 add_nanopb_builders(env)
29 env.Append(CPPPATH = ["#../", "$COMMON"])
32 env.Append(PROTOCPATH = '#../generator')
35 if not env.GetOption('clean'):
39 oldflags = context.env['CCFLAGS']
40 oldlinkflags = context.env['CCFLAGS']
41 context.env.Append(CCFLAGS = flags)
42 context.env.Append(LINKFLAGS = linkflags)
44 context.env.Replace(CCFLAGS = oldflags)
45 context.env.Replace(LINKFLAGS = oldlinkflags)
49 conf = Configure(env, custom_tests = {'CheckCCFLAGS': check_ccflags})
58 conf.env.Append(CPPDEFINES = {'PB_SYSTEM_HEADER': '\\"pb_syshdr.h\\"'})
59 conf.env.Append(CPPPATH = "#../extra")
60 conf.env.Append(SYSHDR = '\\"pb_syshdr.h\\"')
62 if stdbool: conf.env.Append(CPPDEFINES = {'HAVE_STDBOOL_H': 1})
63 if stdint: conf.env.Append(CPPDEFINES = {'HAVE_STDINT_H': 1})
64 if stddef: conf.env.Append(CPPDEFINES = {'HAVE_STDDEF_H': 1})
65 if string: conf.env.Append(CPPDEFINES = {'HAVE_STRING_H': 1})
66 if stdlib: conf.env.Append(CPPDEFINES = {'HAVE_STDLIB_H': 1})
71 conf.env.Append(PROTOCPATH = output.strip())
73 conf.env.Append(PROTOCPATH = '/usr/include')
78 conf.env['PROTOC_VERSION'] = output
81 if 'gcc' in env['CC']:
83 conf.env.Append(CCFLAGS = '-fmudflap')
84 conf.env.Append(LINKFLAGS = '-fmudflap')
91 if 'gcc' in env['CC']:
93 conf.env.Append(CORECFLAGS = extra)
97 if 'clang' in env['CC']:
99 conf.env.Append(CORECFLAGS = extra)
100 conf.env.Append(LINKFLAGS = extra)
103 env = conf.Finish()
106 if 'gcc' in env['CC']:
110 env.Append(CFLAGS = '-ansi -pedantic -g -Wall -Werror -fprofile-arcs -ftest-coverage ')
111 env.Append(CORECFLAGS = '-Wextra')
112 env.Append(LINKFLAGS = '-g --coverage')
115 env.Append(CFLAGS = '-Wno-long-long')
116 elif 'clang' in env['CC']:
118 env.Append(CFLAGS = '-ansi -g -Wall -Werror')
119 env.Append(CORECFLAGS = ' -Wextra -Wcast-qual -Wconversion')
120 elif 'cl' in env['CC']:
124 env.Append(CFLAGS = '/Zi /W2 /WX')
125 env.Append(LINKFLAGS = '/DEBUG')
128 env.Append(CORECFLAGS = '/W4')
129 elif 'tcc' in env['CC']:
131 env.Append(CFLAGS = '-Wall -Werror -g')
133 env.SetDefault(CORECFLAGS = '')
135 if 'clang' in env['CXX']:
136 env.Append(CXXFLAGS = '-g -Wall -Werror -Wextra -Wno-missing-field-initializers')
137 elif 'g++' in env['CXX'] or 'gcc' in env['CXX']:
138 env.Append(CXXFLAGS = '-g -Wall -Werror -Wextra -Wno-missing-field-initializers')
139 elif 'cl' in env['CXX']:
140 env.Append(CXXFLAGS = '/Zi /W2 /WX')
144 env['VARIANT_DIR'] = 'build'
145 env['BUILD'] = '#' + env['VARIANT_DIR']
146 env['COMMON'] = '#' + env['VARIANT_DIR'] + '/common'
150 SConscript("common/SConscript", exports = 'env', variant_dir = env['VARIANT_DIR'] + '/common')
154 …SConscript(subdir, exports = 'env', variant_dir = env['VARIANT_DIR'] + '/' + os.path.dirname(str(s…