File: SConscript.target.darwin

package info (click to toggle)
alljoyn-thin-client-1509 15.09a-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,240 kB
  • sloc: ansic: 55,937; cpp: 2,995; python: 361; sh: 174; makefile: 39
file content (72 lines) | stat: -rw-r--r-- 2,192 bytes parent folder | download | duplicates (4)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import os

Import('env')

# Target specific SCons command line variables
vars = Variables()
vars.Add(BoolVariable('FORCE32', 'Force building 32 bit on 64 bit architecture',           os.environ.get('AJ_FORCE32', False)))
vars.Add(BoolVariable('NO_AUTH', "Compile in authentication mechanism's to the code base", os.environ.get('AJ_NO_AUTH', False)))
vars.Update(env)
Help(vars.GenerateHelpText(env))

# Platform libraries
env.Append(LIBS = ['pthread'])

# Cross compile setup
if os.environ.has_key('CROSS_PREFIX'):
    cc = env['CC']
    cxx = env['CXX']
    ar = env['AR']
    ranlib = env['RANLIB']
    env.Replace(CC = os.environ['CROSS_PREFIX'] + cc)
    env.Replace(CXX = os.environ['CROSS_PREFIX'] + cxx)
    env.Replace(LINK = os.environ['CROSS_PREFIX'] + cc)
    env.Replace(AR = os.environ['CROSS_PREFIX'] + ar)
    env.Replace(RANLIB = os.environ['CROSS_PREFIX'] + ranlib)
    env['ENV']['STAGING_DIR'] = os.environ.get('STAGING_DIR', '')
if os.environ.has_key('CROSS_PATH'):
    env['ENV']['PATH'] = ':'.join([ os.environ['CROSS_PATH'], env['ENV']['PATH'] ] )
if os.environ.has_key('CROSS_CFLAGS'):
    env.Append(CFLAGS=os.environ['CROSS_CFLAGS'].split())
if os.environ.has_key('CROSS_LINKFLAGS'):
    env.Append(LINKFLAGS=os.environ['CROSS_LINKFLAGS'].split())

# Compiler flags
env.Append(CFLAGS = [
    '-pipe',
    '-funsigned-char',
    '-fno-strict-aliasing',
    '-Wall',
    '-Waggregate-return',
    '-Wbad-function-cast',
    '-Wcast-align',
    '-Wfloat-equal',
    '-Wformat=2',
    '-Wno-deprecated-declarations',
    '-Wno-unknown-pragmas',
    '-Wpacked',
    '-Wpointer-arith',
    '-Wshadow',
    '-Wundef',
    '-Wwrite-strings'
])

if env['FORCE32']:
    env.Append(CFLAGS = '-m32')
    env.Append(LINKFLAGS = '-m32')
env.Append(CPPDEFINES = [ 'AJ_MAIN' ])
if env['NO_AUTH']:
    env.Append(CPPDEFINES = [ 'TEST_DISABLE_SECURITY' ])

# Debug/Release Variants
if env['VARIANT'] == 'debug':
    env.Append(CFLAGS = '-g')
else:
    env.Append(CFLAGS = '-Os')

#env['build_shared'] = True
#env['connectivity_options'] = [ 'tcp', 'ardp' ]

# Large Memory Platform
env.Append(CPPDEFINES = ['AJ_NVRAM_SIZE=64000'])
env.Append(CPPDEFINES = ['AJ_NUM_REPLY_CONTEXTS=8'])