Subversion Repositories idreammicro-avr

Compare Revisions

Regard whitespace Rev 7 → Rev 9

/trunk/libraries/digital_io/SConstruct
1,51 → 1,32
# Import build tools.
SConscript('min_env/build_tools.py')
SConscript('#min_env/build_tools.py')
 
# Create and initialize the environment.
env = Environment()
 
# Set environment for AVR-GCC.
env['CC'] = 'avr-gcc'
env['CPPPATH'] = '/usr/lib/avr/include'
env['OBJCOPY'] = 'avr-objcopy'
env['SIZE'] = 'avr-size'
env['AR'] = 'avr-ar'
env['RANLIB'] = 'avr-ranlib'
env.Append(CCFLAGS = '-Os')
SConscript('#min_env/env_target.py')
 
# Define environment name.
env.Append(NAME = 'env_arduino_uno')
# Import environment set for AVR-GCC.
Import('env_target')
 
# Microcontroller type.
env.Append(MCU = 'atmega328p')
# Microcontroller frequency in Hertz.
env.Append(F_CPU = '16000000UL')
 
# Set environment for an Atmel AVR ATmega328p microcontroller.
env.Append(CCFLAGS = '-mmcu=' + env['MCU'])
env.Append(LINKFLAGS = '-mmcu=' + env['MCU'])
env.Append(CPPDEFINES = 'F_CPU=' + env['F_CPU'])
 
# Append CPPPATH.
env.Append(CPPPATH = [ '#../' ])
env_target.Append(CPPPATH = [ '#../' ])
 
# Build library.
SConscript(
'src/SConscript',
variant_dir = '#build/lib/',
exports = { 'env_target' : env },
exports = { 'env_target' : env_target },
duplicate = 0
)
 
# Append LIBPATH and LIBS.
env.Append(LIBPATH = [ '#build/lib/'])
env.Append(LIBS = [ 'digital_io' ])
env_target.Append(LIBPATH = [ '#build/lib/'])
env_target.Append(LIBS = [ 'digital_io' ])
 
# Build demonstration program.
SConscript(
'demo/SConscript',
variant_dir = '#build/demo/',
exports = { 'env_target' : env },
exports = { 'env_target' : env_target },
duplicate = 0
)
 
53,7 → 34,7
SConscript(
'test/SConscript',
variant_dir = '#build/test/',
exports = { 'env_target' : env },
exports = { 'env_target' : env_target },
duplicate = 0
)