#!/usr/bin/python
# scons script for the Arduino sketch
import re

from arduino_scons.arduino_build import ArduinoBuildContext
import base_node 


Import('sketch_build_root')

context = ArduinoBuildContext(ARGUMENTS, build_root=sketch_build_root)
arduino_hex = context.build(extra_sources=base_node.get_sources(),
                            register_upload=True,
                            env_dict={'CPPPATH':
                                      base_node.get_includes()})

Export('arduino_hex')
