Changeset b83dc2a in avrstuff for kbd/ps2toserial/code/Makefile


Ignore:
Timestamp:
Jul 28, 2014, 8:47:03 PM (10 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
f51aacc
Parents:
39e523d
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kbd/ps2toserial/code/Makefile

    r39e523d rb83dc2a  
    1 keyboard.hex: keyboard.bin
    2         avr-objcopy -j .text -j .data -O ihex keyboard.bin keyboard.hex
     1MCU=atmega8
     2
     3include ../../common.mk
     4
     5all: keyboard.hex
    36
    47keyboard.bin: keyboard.o usart.o main.o
    5         avr-gcc keyboard.o usart.o main.o -o keyboard.bin -mmcu=atmega8 -Os
     8        $(CC) $^ -o $@ -mmcu=$(MCU) -Os
    69
    7 main.o: main.c ../../libs/usart/usart.h ../../libs/ps2_keyboard/ps2_keyboard.h
    8         avr-gcc -c main.c -mmcu=atmega8 -Os -o main.o -mmcu=atmega8 -Os
     10main.o: main.c $(LIBS)/usart/usart.h $(LIBS)/ps2_keyboard/ps2_keyboard.h
     11        $(CC) -c $< -Os -o $@ -mmcu=$(MCU) -Os
    912
    10 usart.o: ../../libs/usart/usart.c ../../libs/usart/usart.h
    11         avr-gcc -c ../../libs/usart/usart.c -o usart.o -mmcu=atmega8 -Os
     13usart.o: $(LIBS)/usart/usart.c $(LIBS)/usart/usart.h
     14        $(CC) -c $< -o $@ -mmcu=$(MCU) -Os
    1215
    13 keyboard.o: ../../libs/ps2_keyboard/ps2_keyboard.c ../../libs/ps2_keyboard/ps2_keyboard.h ../../libs/ps2_keyboard/keymap.h
    14         avr-gcc -c ../../libs/ps2_keyboard/ps2_keyboard.c -mmcu=atmega8 -Os -o keyboard.o
     16keyboard.o: $(LIBS)/ps2_keyboard/ps2_keyboard.c $(LIBS)/ps2_keyboard/ps2_keyboard.h $(LIBS)/ps2_keyboard/keymap.h
     17        $(CC) -c $< -mmcu=$(MCU) -Os -o $@
Note: See TracChangeset for help on using the changeset viewer.