cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0011 NEW)

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

set(AVERSIVE_TOOLCHAIN_ATMEGA640 1 CACHE STRING "")

set(ATMEGA640_FLAGS "-D__AVR_ATmega640__")
set(ATMEGA640_FLAGS "${ATMEGA640_FLAGS} -DAVERSIVE_TOOLCHAIN_ATMEGA640")

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

unset(ATMEGA640_FLAGS)
