import os

debug = ARGUMENTS.get( 'debug', 0 )
common_env = Environment(ENV = os.environ)

lwaptk_base_dir = '../../../'


common_env.Append( CCFLAGS = [ '-Wall', '-std=c++11' ] )

if int(debug) == 1 :
        common_env.Append( CCFLAGS = ['-g',  '-DDEBUG' ] )
elif int(debug) == 2 :
        common_env.Append( CCFLAGS = ['-g',  '-DNDEBUG' ] )
else:
        common_env.Append( CCFLAGS = ['-O3', '-DNDEBUG'] )

Export( 'common_env' )

generic_objs = SConscript(os.path.join( lwaptk_base_dir,'src/SConscript.aptk'))
agnostic_objs = SConscript(os.path.join( lwaptk_base_dir,'interfaces/agnostic/SConscript.agnostic'))
ff_wrapper_objs = SConscript(os.path.join( lwaptk_base_dir,'interfaces/ff-wrapped/SConscript.ff'))
siw_objs = SConscript('src/SConscript')

common_env.Program( 'replanner', siw_objs + generic_objs + agnostic_objs + ff_wrapper_objs ) 
