cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0011 NEW)

set(AVERSIVE_TOOLCHAIN_TARGET "atmega2561")
include("${CMAKE_CURRENT_LIST_DIR}/atmegaxx0_1.cmake")

set(AVERSIVE_TOOLCHAIN_ATMEGA2561 1 CACHE STRING "")

set(ATMEGA2561_FLAGS "-D__AVR_ATmega2561__")
set(ATMEGA2561_FLAGS "${ATMEGA2561_FLAGS} -DAVERSIVE_TOOLCHAIN_ATMEGA2561")

set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} ${ATMEGA2561_FLAGS}" CACHE STRING "")
set(CMAKE_CXX_FLAGS    "${CMAKE_CXX_FLAGS} ${ATMEGA2561_FLAGS}" CACHE STRING "")
set(CMAKE_ASM_FLAGS    "${CMAKE_ASM_FLAGS} ${ATMEGA2561_FLAGS}" CACHE STRING "")

unset(ATMEGA2561_FLAGS)
