################################################################################
#
## Example Makefile
#
# For convenience, copy this file to "Makefile" and customize it to fit your
# needs.
#
# Then you can type 'make avr' or simply 'make' to build for your printer.
#
################################################################################
.PHONY: sim avr clean all default program regressiontests

# Override variables in the stock makefiles
export F_CPU = 20000000L
export MCU = atmega644p

default: avr

all: sim avr

# Build the simulator
sim:
	@echo "----[ Simulator ]----"
	@make -sf Makefile-SIM

# Build Teacup for an Atmel processor
avr:
	@echo "----[ $(MCU) ]----"
	@make -sf Makefile-AVR

# Shortcut to program target in Makefile-AVR
program:
	@echo "----[ $(MCU) ]----"
	@make -sf Makefile-AVR program

regressiontests:
	@make -sf Makefile-common regressiontests

clean:
	@echo "----[ Clean ]----"
	@make -sf Makefile-SIM clean
	@make -sf Makefile-AVR clean
	# Add any more cleanup steps you want here. Example,
	# rm -f *.png
