#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#

# -*- mode: python; -*-
# multicast directory

import platform
if platform.system() == 'Darwin':
    Return()

Import('AgentEnv')
env = AgentEnv.Clone()

# Function to append TOP level directory
def AddTopDir(list):
    return [Dir('./' + x).abspath for x in list]

    asdf
cpppath = [
    'common',
    'gmp_map',
    'agent_map',
    'grpmgmt',
    'stubs/bitvector',
    ]

env.Prepend(CPPPATH = AddTopDir(cpppath))

except_env = env.Clone()
cflags = except_env['CCFLAGS']
if '-fno-exceptions' in cflags:
   cflags.remove('-fno-exceptions')
except_env.Replace(CCFLAGS=cflags)

GmpEnv = env.Clone()

Export('GmpEnv')

subdirs = [
    'gmp_map',
    'agent_map',
    'stubs',
    'grpmgmt',
    ]

for dir in subdirs:
    env.SConscript(dir + '/SConscript', exports='GmpEnv',
                   duplicate=0)
