forked from Traumflug/Teacup_Firmware
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make Makefile-{SIM,AVR,common} more generic
Allow stock makefile variables to be overridden by 'make' caller so the user's 'Makefile' can be authoritative. See Makefile-example for usage.
- Loading branch information
Showing
3 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
################################################################################ | ||
# | ||
## 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 | ||
|
||
# Override variables in the stock makefiles | ||
export F_CPU = 20000000L | ||
export MCU_TARGET = 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_TARGET) ]----" | ||
@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 |