HOME_TREE := $(ENV_ARDUINO_LITE_PATH)

# TODO: Set the WINAVR_HOME if you do not want to use the build-in winavr
#WINAVR_HOME := /d/WinAVR-20090313

# TODO: set the prj_name here
# default name is your folder's title
PRJ_NAME := $(notdir $(CURDIR))

# TODO: set the output binary name here
# default name is your folder's tilte
BINARY_NAME := $(notdir $(CURDIR))

# enable the following marco in case you want these features
#EXTRA_DEFS = -D_ENABLE_SERIAL_CALLBACK
#EXTRA_DEFS += -D_SERIAL_CUSTOM_RX_ROUTINE_

#includes the common definitions...
#do not remove them unless you know what you are doing
include $(HOME_TREE)/scripts/mak_avr_def.inc
#############################################
# the following are default settings,
# modify them if necessary...
UPLOAD_PORT := $(ENV_UPLOAD_PORT) # COM3
PORT_RATE := $(ENV_PORT_RATE) # 57600
MCU := $(ENV_MCU) # atmega168
F_CPU := $(ENV_F_CPU) # 16000000
AVRDUDE_PROGRAMMER := $(ENV_AVRDUDE_PROGRAMMER)
#############################################

# TODO: set the fuse if necessary.
# Fuse setting will be used when using the make fuse command
# These are the default fuse setting for m168 based ArduinoBoard (bootloader enabled)
#  HFUSE=DD
#  LFUSE=FF
#  EFUSE=00
#  LOCKFUSE=00

# TODO: list the C-Source files here
# All of the .c files within this folder will be included by default
CSRC := $(wildcard src/*.c)

# TODO: list the CPP-Source files here
# All of the .cpp files within this folder will be included by default
CXXSRC := $(wildcard src/*.cpp)

# TODO: list the Assmebly-Source files here
# All of the .S files within this folder will be included by default
ASRC := $(wildcard src/*.S)

# TODO: Put the header's path that you want to include
INCLUDE_PATH +=  -I$(SOURCE_ROOT)/core

EXTRA_DEFS := -DARDUINO=106

all:  build_avr_lib build sizebefore sizeafter

burnall: $(TARGET).hex erase fuse burn
	
#include Arduino-Lite building rules.
include $(HOME_TREE)/scripts/mak_lib.inc

#include standard build logic
include $(HOME_TREE)/scripts/mak_avr_common.inc


additionalclean: clean_avr_lib
