source: avrstuff/kbd/xtk/code/Makefile@ b83dc2a

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

Fix ps2toserial build.

  • Share relevant stuff in common.mk so I don't have to repeat myself too much and copypaste all the time.
  • Prepare for MCU switchability.

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

  • Property mode set to 100644
File size: 515 bytes
Line 
1MCU=atmega48p
2
3include ../../common.mk
4
5all: keyboard.hex
6
7keyboard.bin: keyboard.o main.o
8 $(CC) $^ -o $@ -mmcu=$(MCU) -Os
9
10main.o: main.c $(LIBS)/ps2_keyboard/ps2_keyboard.h
11 $(CC) -std=c99 -c $< -mmcu=$(MCU) -Os -o $@ -Os
12
13keyboard.o: $(LIBS)/ps2_keyboard/ps2_keyboard.c $(LIBS)/ps2_keyboard/ps2_keyboard.h $(LIBS)/ps2_keyboard/keymap.h
14 $(CC) -DCALLBACK="callback();" -c $< -mmcu=$(MCU) -Os -o $@
15
16clean:
17 rm *.o *.bin *.hex
18
19flash: keyboard.hex
20 $(AVRDUDE) -c usbasp -p $(MCU) -Uflash:w:$^
Note: See TracBrowser for help on using the repository browser.