source: avrstuff/kbd/ps2toserial/code/Makefile@ d31c2f5

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

Build things in an MCU subfolder to avoid misuse of .o files.

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

  • Property mode set to 100644
File size: 593 bytes
Line 
1MCU=attiny2313
2
3all: $(MCU).hex
4
5include ../../common.mk
6
7$(MCU):
8 mkdir -p $(MCU)
9
10$(MCU).bin: $(MCU)/keyboard.o $(MCU)/usart.o $(MCU)/main.o
11 $(CC) $^ -o $@ -mmcu=$(MCU) -Os
12
13$(MCU)/main.o: main.c $(LIBS)/usart/usart.h $(LIBS)/ps2_keyboard/ps2_keyboard.h $(MCU)
14 $(CC) -c $< -Os -o $@ -mmcu=$(MCU) -Os
15
16$(MCU)/usart.o: $(LIBS)/usart/usart.c $(LIBS)/usart/usart.h $(MCU)
17 $(CC) -c $< -o $@ -mmcu=$(MCU) -Os
18
19$(MCU)/keyboard.o: $(LIBS)/ps2_keyboard/ps2_keyboard.c $(LIBS)/ps2_keyboard/ps2_keyboard.h $(LIBS)/ps2_keyboard/keymap.h $(MCU)
20 $(CC) -c $< -mmcu=$(MCU) -Os -o $@
Note: See TracBrowser for help on using the repository browser.