################################################################################
#
## 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.
#
# Another choice is to copy "Makefile-AVR" to "Makefile". This is less
# convenient for building the simulator, but also allows to upload to the
# controller with 'make prog'.
#
################################################################################
.PHONY: sim avr clean all default

# 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

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
