source: avrstuff/kbd/common.mk@ 87ab18e

main
Last change on this file since 87ab18e was ea32107, checked in by Adrien Destugues <pulkomandy@…>, 10 years ago

kbd: working XTK on ATtiny2313

  • Move more stuff to common.mk and handle multicpu support
  • Fix some pins mixups to get things working

git-svn-id: svn://pulkomandy.tk/avrstuff@113 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe

  • Property mode set to 100644
File size: 612 bytes
RevLine 
[b83dc2a]1# Executables (with Haiku hybrids support)
2CC := $(shell { which avr-gcc || which avr-gcc-x86; } 2>/dev/null)
3OBJCOPY := $(shell { which avr-objcopy || which avr-objcopy-x86; } 2>/dev/null)
4AVRDUDE := $(shell { which avrdude || which avrdude-x86; } 2>/dev/null)
5
6# Some useful paths (relative to each project)
7LIBS=../../../libs
8
[ea32107]9CFLAGS=-DF_CPU=$(F_CPU) -DBAUD=$(BAUD) -mmcu=$(MCU) -Os
10
11# default target
12all: $(MCU).hex
13
[f51aacc]14# Generic rules
[b83dc2a]15%.hex: %.bin
16 $(OBJCOPY) -j .text -j .data -O ihex $^ $@
17
[ea32107]18$(MCU):
19 mkdir -p $(MCU)
20
21flash: $(MCU).hex
22 $(AVRDUDE) -c usbasp -p $(MCU) -Uflash:w:$^
23
[f51aacc]24clean:
25 rm *.bin *.o *.hex
Note: See TracBrowser for help on using the repository browser.